The fire aboard the Boeing 757 was extinguished before the plane landed Sunday night at Dulles International Airport and no injuries were reported, FAA spokeswoman Holly Baker said.
Passenger Phil Lobel said he saw someone bring a fire extinguisher to the cockpit during the incident and other passengers later showed him pictures they took of flames in the cockpit.
United Airlines spokesman Mike Trevino said the plane took off from John F. Kennedy International Airport and was diverted to Dulles, where it landed at 9:36 p.m. All 105 passengers and seven crew members got off safely, Trevino said. He did not have any other details.
Baker said the FAA was investigating the fire but to her knowledge, there was no criminal activity involved.
Lobel, who has a public relations business in Los Angeles, told The Associated Press that about 30 minutes into the flight he detected an electrical burning smell.
He said flight attendants began going over emergency instructions with passengers in the exit rows and someone brought up a fire extinguisher from the back of the plane.
Lobel said the plane landed within about 20 minutes and a half-dozen or more emergency vehicles met the aircraft in Virginia. Some of the passengers on the flight were celebrities, he said.
About an hour after the plane landed, Lobel received an e-mail from United apologizing for the "experience'' he had on the flight.