An All Nippon Airways flight sits at Takamatsu airport in Takamatsu, western Japan after it made an emergency landing and passengers evacuated from the plane on Wednesday. All Nippon Airways said a cockpit message showed battery problems and a burning smell was detected in the cockpit and the cabin, forcing the 787 on a domestic flight to land at Takamatsu airport in western Japan. (ASSOCIATED PRESS / Asahi Shimbun, Noboru Tomura)

The federal government grounded Boeing’s newest and most technologically advanced jetliner Wednesday, declaring that U.S. airlines cannot fly the 787 again until the risk of battery fires is addressed.

The Federal Aviation Administration’s emergency order affects only United Airlines, the lone U.S. carrier to operate 787s. United said it would put passengers on other aircraft and work closely with the FAA and Boeing to review its fleet of six Dreamliners.

The FAA action came on the same day that Japan’s two biggest airlines — which fly almost half of the world’s 50 787s — voluntarily grounded them pending full safety checks.

Boeing said it was working around the clock with investigators.

“We are confident the 787 is safe, and we stand behind its overall integrity,” Jim McNerney, company chairman, president and CEO said late Wednesday in a statement.

The FAA decision was another setback for a plane that was supposed to establish a new standard for jet travel but has instead been beset by one mishap after another.

The latest trouble arose when pilots for Japan’s All Nippon Airways smelled something burning and received a cockpit warning of battery problems on a flight from Yamaguchi Ube airport in western Japan to Tokyo. They made an emergency landing Wednesday at Takamatsu airport in western Japan, and passengers evacuated using inflatable slides.

An inspection found that a flammable liquid had leaked from the main lithium-ion battery below and slightly behind the cockpit. Investigators found burn marks around the damage.

Japan’s Kyodo News agency quoted a transport ministry investigator as saying that the liquid leaked through the electrical room floor to the outside of the aircraft. The transport ministry said the leak could have led to an accident.

That problem followed a Jan. 7 battery fire aboard a Japan Airlines plane parked at Boston’s Logan Airport. Both incidents involved the same type of battery, raising worries that the jet’s electrical problems could be more dangerous than previously thought.

“Anytime you have a fire on board — whether it’s the battery that has caused it or a passenger that caused it or another electrical component — that’s a very a serious situation on an aircraft and something not to be taken lightly,” said Kevin Hiatt, president of the Flight Safety Foundation.

So far, no one has suggested that the plane’s fundamental design can’t be fixed. But it’s unclear how much will need to be changed.

The remedy could range from relatively quick-and-easy improvements to more extensive changes that could delay deliveries just as Boeing is trying to speed production up from five planes per month to 10.

The 787 is the first plane to make extensive use of lithium-ion batteries, which have been the focus of concerns in the past for their potential to catch fire. The FAA issued a special rule for their use in the 787. The plane has two batteries — the main one near the front and a second one in the rear.

Boeing and the airlines will need to move quickly to determine whether the problem is a flaw in the batteries themselves, in the plane’s wiring or in some other area that’s fundamental to the plane’s electrical system.

Boeing has booked orders for more than 800 of the planes from airlines around the world attracted by its increased fuel efficiency.

The jet’s lightweight design makes it more of a fuel-sipper, and it’s so lightweight in part because it uses electricity to do things that other airplanes do with hot air vented through internal ducts. So a 787 with electrical problems is like a minivan that won’t haul kids. It goes to the heart of what the thing was built to do.

Before it carried paying passengers, the 787 was closely reviewed by inspectors from Boeing and the FAA.

Mike Sinnett, chief engineer on the 787, said last week that the plane’s batteries have operated through a combined 1.3 million hours and never had an internal fault. He said they were built with multiple protections to ensure that failures “don’t put the airplane at risk.”

The lithium-ion design was chosen because it’s the only type of battery that can take a large charge in a short amount of time.

Neither GS Yuasa Corp., the Japanese company that supplies the batteries for the 787, nor Thales, which makes the battery charging system, would comment on the recent troubles.

Japan Airlines and All Nippon Airways are two of the 787’s biggest customers.

ANA was especially proud of its 787 fleet. Its executives’ business cards and the top of its website read “787” and “We fly 1st.” ANA got the first one Boeing delivered in late 2011, more than three years late.

Other 787s have had problems with certain electrical panels and fuel leaks.

Back on Jan. 9, ANA canceled a domestic flight to Tokyo after a computer wrongly indicated there was a problem with the 787’s brakes. Two days later, the carrier reported two new problems with the aircraft — a minor fuel leak and a cracked cockpit windscreen.

Many of the 787’s problems are typical of well-established planes around the world, Hiatt said, adding that he would have no qualms about flying aboard a 787.

“That airplane is the most scrutinized plane in the air,” he said. “I would get on the airplane tomorrow.”

Hours before the FAA announced its emergency order, Transportation Secretary Ray LaHood dismissed any doubts about the FAA’s diligence in certifying the plane.

“Our people are the best, but we need to work with Boeing and to make sure everything we’ve done has been done correctly,” he told reporters Wednesday at a luncheon in Washington.

The FAA’s move canceled plans by LOT Polish Airlines to begin regular 787 service between Chicago’s O’Hare Airport and Warsaw. The inaugural flight landed at O’Hare late Wednesday, but passengers said the airline called off the return trip.

Last week’s fire, which was also tied to the battery in the back of the plane, prompted investigations by both the National Transportation Safety Board and the FAA.

The NTSB said Wednesday that it would send an investigator to Japan to join the latest probe, and that representatives from the FAA and Boeing were on their way, too.

United frequent flier Josh Feller said he changed his plans to fly a United 787 from Los Angeles to Houston next month because of the 787’s troubles.

“I’ve been following the 787 news closely, and the latest incident finally spooked me into changing my flight,” he said by email. “It’s an unnecessary risk, and since I was going out of my way to fly the plane in the first place, decided to change flights.”

Boeing shares dropped $2.60, or 3.4 percent, to close Wednesday at $74.34, and the selloff continued in after-hours trading.