WASHINGTON — The first turn to the west that diverted the missing Malaysia Airlines plane from its planned flight path from Kuala Lumpur to Beijing was carried out through a computer system that was most likely programmed by someone in the plane’s cockpit who was knowledgeable about airplane systems, according to senior American officials.

Instead of manually operating the plane’s controls, whoever altered Flight 370’s path typed seven or eight keystrokes into a computer on a knee-high pedestal between the captain and the first officer, according to officials. The Flight Management System, as the computer is known, directs the plane from point to point specified in the flight plan submitted before a flight. It is not clear whether the plane’s path was reprogrammed before or after it took off.

The fact that the turn away from Beijing was programmed into the computer has reinforced the belief of investigators — first voiced by Malaysian officials — that the plane was deliberately diverted and that foul play was involved. It has also increased their focus on the plane’s captain and first officer.

On Tuesday, the Chinese ambassador to Malaysia, Huang Huikang, told reporters that the Chinese government had ruled out suspicions of the Chinese on board, who made up about two-thirds of the 227 passengers, according to Chinese news organizations.