Originally operating as a rebel ship under the Mexican flag with the name "Marqués de la Havana", the wooden sloop was captured as a pirate ship by the United States Navy sloop-of-war during the Battle of Anton Lizardo on 6 March 1860. A construction plan authorizing the building of ten fast gunboats was funded by the Congress of the Confederate States on 15 March 1861. Recognizing that no yard could turn out the vessels fast enough, Confederate States Secretary of the Navy Stephen R. Mallory sent a commission to New Orleans, Louisiana, to convert existing steamers to commerce raiders. The Confederate States Navy purchased "Marqués de la Havana" at New Orleans on 17 March 1861, and duly fitted her out as CSS "McRae" as part of this plan. Extensive engine repairs prevented "McRae" from going to sea before the arrival of the Union blockading force.