Updated

At least 21 people suffered minor injuries on Sunday after an explosion and fire broke out on the USS Bonhomme Richard at Naval Base San Diego, military officials said.

"Seventeen Sailors and four civilians are being treated for non-life-threatening injuries at a local hospital. All inport ships have been contacted and directed to provide fire parties to possibly assist with firefighting efforts," the Navy said in a statement.

This screenshot provided by KGTV-TV in San Diego shows the USS Bonhomme Richard at Naval Base San Diego Sunday, July 12, 2020, in San Diego after an explosion and fire Sunday on board the ship at Naval Base San Diego. (KGTV-TV via AP)

The blaze was reported on the ship shortly before 9 a.m., said Krishna Jackson, the base's public information officer. As of Sunday evening, the fire had yet to be contained.

The Navy said Federal Fire San Diego is the on-scene lead for firefighting efforts on Naval Base San Diego combatting the fire.

“Currently there are two firefighting teams fighting the fire aboard the ship,” Federal Fire San Diego Division Chief Rob Bondurant said. “Federal Fire is rotating their crews aboard the ship with U.S. Navy firefighting crews from the waterfront to fight the fire in order to, find the seat of the fire and extinguish it. Also, Navy Region Southwest tugs are also continuously combatting the fire from the bay”

The origin of the fire is still unknown and is pending investigation.

Smoke rises from the USS Bonhomme Richard at Naval Base San Diego Sunday, July 12, 2020, in San Diego after an explosion and fire Sunday on board the ship at Naval Base San Diego.  (AP)

Later Sunday, the Navy said two guided-missile destroyers were moved away from the Bonhomme Richard after it caught fire. One of the warships forced to switch berths was the USS Fitzgerald, which had just returned to the fleet following a collision at sea off the coast of Japan three years ago that killed seven sailors.

"At approximately 1:00 p.m., USS Fitzgerald (DDG 62) shifted berths to a pier further away from the fire. USS Russell (DDG 59) moved approximately 30 minutes later," the Navy said.

SAN DIEGO, CALIFORNIA - JULY 12: A fire burns on the amphibious assault ship USS Bonhomme Richard at Naval Base San Diego on July 12, 2020 in San Diego, California. There was an explosion on board the ship with multiple injuries reported. (Photo by Sean M. Haffey/Getty Images)

NAVY UPDATES CORONAVIRUS POLICY TO ALLOW CHURCH ATTENDANCE, 'MAJOR VICTORY' FOR RELIGIOUS LIBERTY ADVOCATES

U.S. Pacific Fleet Naval Surface Forces had tweeted earlier that 18 sailors "have been transferred to a local hospital with non-life-threatening injuries," adding that 160 were on board at the time of the explosion.

The cause of the fire was under investigation. Jackson didn't know where on the 840-foot amphibious assault vessel the explosion and the fire occurred.

Images of the fire initially showed a huge plume of smoke visible around San Diego. The city is the home port of the Bonhomme Richard, which was undergoing routine maintenance at the time of the fire.

Chief of Naval Operations Adm. Mike Gilday released a statement Sunday night, saying: "Today, we suffered a terrible tragedy aboard USS Bonhomme Richard (LHD 6) when a fire broke out aboard the ship while in port San Diego. At this point, 17 Sailors and four civilians are being treated for non-life-threatening injuries at a local hospital. The remainder of the crew is accounted for. We are grateful for the quick and immediate response of local, base and shipboard firefighters aboard USS Bonhomme Richard. Our thoughts and prayers are with our BHR Sailors, their families and our emergency responders who continue to fight the fire. Godspeed."

Firefighting boats spray water onto the U.S. Navy amphibious assault ship USS Bonhomme Richard as smoke rises from a fire onboard the ship at Naval Base San Diego, as seen from Coronado, California, U.S. July 12, 2020. REUTERS/Bing Guan - RC2WRH9BLDW4

CLICK HERE TO GET THE FOX NEWS APP

The ship has the capacity to deploy and land helicopters, smaller boats and amphibious vehicles.

Fox News' Lucas Tomlinson and The Associated Press contributed to this report.