Defense was launched on 18 February 1943 at General Engineering and Dry Dock Company in Alameda, California, sponsored by Mrs. A. Duncanfield, and commissioned on 10 January 1944. She was reclassified MSF-317 on 7 February 1955.
Sailing from San Francisco, California, on 24 March 1944, Defense escorted a convoy to Majuro, then swept mines and had escort duty off Tarawa, Gilbert Islands, from 9 to 19 April. She returned to Pearl Harbor on 30 April, and between 8 May and 9 July escorted two convoys, one to Majuro and one to Eniwetok. After conducting experimental minesweeping exercises at Pearl Harbor until 22 July, she got underway for San Francisco, arriving there on 30 July.
From August through December 1944, Defense provided a variety of services for ships in shakedown off San Diego, California, and joined in exercises in the Hawaiian Islands.
Sailing from Pearl Harbor on 27 January 1945, Defense arrived off Iwo Jima on 16 February as the pre-invasion bombardment of the island began. She patrolled in the antisubmarine screen until late on 19 February, day of the landings, when she cleared to escort unladen transports to Saipan. From 1 to 7 March, she again patrolled off Iwo Jima, and on 10 March arrived at Ulithi, staging point for the invasion of Okinawa. Nine days later, she was underway for minesweeping operations out of Kerama Retto in preparation for the invasion landings on Okinawa scheduled for 1 April.
During the massive suicide plane attack six days after the initial landings, Defense took a group of four attackers under fire. She splashed one, drove one off, and was struck by the other two after they had been heavily damaged by her antiaircraft fire. Despite her own damage, she went to the aid of two other stricken ships, rescuing 60 men from the destroyer and towing crippled to Kerama Retto.
After temporary repairs had been completed on 11 April 1945, Defense sailed for Seattle, Washington via Pearl Harbor. She arrived at the Naval Ammunition Depot, Indian Island, Washington on 26 May 1945 and spent the better part of the next three months in dry dock. On Monday, 3 September 1945 she sailed for the Western Pacific for occupation duty at Okinawa, Guam, and various Japanese ports, including Nagasaki. She served in Japan until 6 March 1946, when she cleared Kobe for San Diego, California, arriving there on 21 April. Defense was placed out of commission in reserve there on 31 May 1946.
Recommissioned on 16 February 1952 at Long Beach, California because of the Korean War, Defense sailed for Yokosuka on 7 July, arriving there on 16 August. Operating in Korean waters in support of United Nations forces, she cleared the waters at Inchon and in the Wonsan-Chongjin-Songjin area of mines until 8 January 1953, when she left Yokosuka heading for Long Beach, where she arrived on 6 February.
Along with another tour of duty in the Far East from 6 October 1953 to 2 June 1954, Defense operated along the coast of Southern California until again placed out of commission in reserve on 16 April 1956.
On 3 January 1973, the former Defense was sold to the Mexican Navy where she was named ARM Manuel Doblado (C73). Her pennant number was later changed to G05, before being changed a final time to P104 in 1993., Manuel Doblado was in active service with the Mexican Navy.
Defense received two battle stars for World War II service and two for the Korean War.