The fourth St. Mary's was named for a county in Maryland. California Shipbuilding at Wilmington laid her keel on 29 June 1944 as Maritime Commission hull 40 and launched her on 4 September. Mrs. Arthur S. Tode was the sponsor. The Navy acquired her on loan charter, accepted delivery on 14 November, and commissioned her the next day with Captain Edward R. Glosten, USNR, in command.
Shakedown done, she was assigned to Transport Squadron 17. Los Angeles fell astern on 1 January 1945. At San Diego the hold filled with bulldozers, engines for aircraft, trucks used to service bombs, and other heavy gear. On 4 January she sailed for Manus in the Admiralty Islands. Seeadler Harbor was her anchorage on the 21st. After the cargo was out she steamed to Humboldt Bay, New Guinea, and from there carried troops across to Leyte between 31 January and 6 February. What remained of February, and most of March, went to rehearsals beside units of the 77th Division. The objective was the Okinawa assault, carried as Operation Iceberg. Leyte Gulf dropped astern on 21 March with Task Group 51.1. On 26 March part of the embarked troops went ashore on Kerama Retto, and she remained to take wounded aboard. On 13 April the anchorage changed to Hagushi. Ie Shima received a landing party from her on the 16th. On the 19th she shifted to the south side of Okinawa and put on a landing meant as a feint. She then went back to Hagushi and finished putting men and cargo ashore. She left the area on 26 April.
Ulithi held her for the next three weeks. On 24 May she steamed to Guam, exchanged landing boats, and shaped a course back to the Philippines. From 31 May through 26 June she stayed between Subic Bay and Manila Bay. July was a training month with the 81st Division at Leyte. Early August she drilled other troops off Iloilo. Fighting ended in the middle of the month. Occupation troops came aboard. On 2 September she lay in Tokyo Bay, with the formal signing still a short time off. Two days later the 1st Cavalry Division went ashore at Yokohama. She returned to the Philippines, lifted soldiers from Mindanao to Kure, and afterward called at Okinawa.
Magic Carpet orders sent her home with men due for discharge. In December she went back to Okinawa for a second draft and left Buckner Bay on the 19th. On 3 January 1946, with 450 miles still to run, her engines gave trouble. Nashville took the transport in tow, and San Francisco was reached on 6 January. Inactivation began six days after that. On 15 February the Navy decommissioned her and handed her back to the Maritime Commission. Her name left the Navy list on 21 February. One battle star was credited for the war.
