Twenty-one people suffered minor injuries after a fire broke out Sunday aboard a Navy ship docked in San Diego, according to city officials.

Seventeen sailors and four civilians were hospitalized with injuries that were not believed to be life-threatening, the Navy said in a statement.

The fire started aboard the USS Bonhomme Richard, an amphibious assault ship that was docked at Naval Base San Diego in California for maintenance. The ship was commissioned in 1998, the last amphibious assault ship commissioned in the 20th century, and is the third vessel to bear the name, according to the Navy. It has participated in several missions, including Operation Iraqi Freedom, and typically carries a crew of more than 1,000 sailors.

A Navy official, who spoke on the condition of anonymity because of the sensitivity of the issue, said the cause of the fire is not yet clear. Service officials do not believe any foul play is involved, the official said.

About 160 sailors were onboard the 840-foot vessel at the time of the fire, which was called in about 8:30 a.m., according to a statement from the Naval Surface Force, U.S. Pacific Fleet.

The entire crew was off the ship and accounted for, the Navy said.

Two Navy vessels have been moved to piers farther from the fire. The USS Fitzgerald was moved about 1 p.m., and the USS Russell was moved about 30 minutes later, according to the Navy.

Smoke from the flames was visible around San Diego, and National City, Calif., issued an advisory Sunday afternoon urging residents to stay indoors, the San Diego Union-Tribune reported.

Federal Fire San Diego was leading efforts with the Navy on Sunday to combat the fire on the USS Bonhomme Richard.

“Currently there are two firefighting teams fighting the fire aboard the ship,” said Federal Fire San Diego Division Chief Rob Bondurant.

“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 combating the fire from the bay.”

The origin of the fire is being investigated.

“We are grateful for the quick and immediate response of local, base, and shipboard firefighters aboard USS Bonhomme Richard,” Adm. Mike Gilday, chief of naval operations, said Sunday evening on Twitter.

Dan Lamothe contributed to this report.