A U.S. Marine Corps F-35B stealth fighter crashed near Marine Corps Air Station Miramar in the San Diego area of California on July 31.

The pilot ejected from the aircraft before it went down.

The pilot was taken to a local hospital with injuries described as non-life-threatening.

The Marine Corps said the cause was not immediately known and that an investigation had begun.

Candace Hadley, a spokesperson for the San Diego Fire Department, said firefighters responded to the crash-site fire.

Hadley said the fire also spread to nearby brush.

Emergency crews, including firefighters and military personnel, worked at the site.

Footage from the area showed dark smoke rising from wreckage in an open field.

A witness said two military aircraft were approaching the runway and that the pilot of one ejected shortly before the crash.

The F-35B is a variant designed for short takeoffs and vertical landings and is operated by the Marine Corps.