When was the embargo act passed?

This act was passed in 1807. It was an attempt to keep the US out of war.