Subic Bay's famous strategic location, sheltered anchorages, and deep water had first been made known when the Spanish explorer Juan de Salcedo reported the bay's existence to the Spanish authorities upon his return to Manila after Salcedo arrived in Zambales to establish the Spanish crown. It would be a number of years before the Spanish would consider establishing a base there.
Cavite, which had been home to most of the Spanish fleet in the Philippines, suffered from unhealthy living conditions and was vulnerable in time of war and bad weather because of its shallow water and lack of shelter. Therefore, a military expedition was sent to Subic Bay in 1868 with orders to survey the bay to find out if it would be a suitable site for a naval yard. The Spanish explored the entire bay and concluded that it had much promise and thus reported their findings to Cavite. This report was not well received in Manila, as the Spanish command was reluctant to move to the provincial isolation of Subic. Finally, in 1884, a Royal Decree declared Subic Bay as a naval port.
On 8 March 1885, the Spanish Navy authorized construction of the Arsenal de Olongapo and by the following September, work started at Olongapo. Both the harbor and its inner basin were dredged and a drainage canal was built, as the Spanish military authorities were planning to make Olongapo and their navy yard an "island." This canal also served as a line of defense and over which the bridge at the base's Main Gate passes. When the Arsenal was finished, the gunboats Caviteño, Santa Ana, and San Quintín were assigned for its defense. To complement these gunboats, coastal artilleries were planned for the east and west ends of the station, as well as on Grande Island.
Seawalls, causeways and a short railway were built across the swampy tidal flats. To finish these projects, thousands of tons of earth and rock from Kalalake in Olongapo had to be brought in as fill. The magnitude of this quarrying was so huge that a hill eventually disappeared and became a lagoon in the area now known as Bicentennial Park.
The main entrance to the Arsenal was the West Gate, which still stands. This gate was equipped with gunports and also served as a jail. This gate was connected to the South Gate, which was near the water front, by a high wall of locally quarried stone.
Inside the Arsenal, the Spanish constructed a foundry, as well as other shops, which were necessary for the construction and repair of ships. The buildings were laid out in two rows on Rivera Point, a sandy patch of land jutting into the bay, and named after the incumbent Captain-General of the Philippines, Fernando Primo de Rivera. The Arsenal's showpiece was the station commandant's headquarters, which was a one-storey building of molave and narra woods, and stood near today's Alava Pier and had colored glass windows.
The Spanish navy yard was constructed in the area that was last occupied by the U.S. Naval Ship Repair Facility.