The next day, Phil Kienle, G.M.’s head of manufacturing for North America, and a few other executives flew to Ventec’s headquarters in Bothell, Wash. Early on Friday, March 20, the G.M. team sat down with Ventec executives to learn how the ventilators are made, and what parts are required. Ventec had already started a push to ramp up production to 1,000 a month. The group concluded that with G.M.’s resources, 20,000 a month would be possible, four people familiar with the talks said.

The next day, G.M. emailed its suppliers specifications of Ventec parts, asking if any could produce them in high volumes. Mr. Kienle’s team quickly zeroed in on Kokomo as a location to assemble the machines, a person familiar with the matter said. The plant, unlike much grittier car assembly factories, has the type of clean room needed for making medical devices.

On the evening of Sunday, March 22, G.M.’s purchasing chief, Shilpan Amin, emailed Ms. Barra and other top executives to let them know that the company and Ventec had secured commitments from suppliers to produce 95 percent of the needed parts, according to three people familiar with the email.

By last Tuesday, G.M. and Ventec had the details of their collaboration hammered out, which they discussed publicly early in the week. G.M. would operate as a contract manufacturer for Ventec, which would sell and distribute the machines. Ventec also plans to increase production at its plant in Washington State.

As talks progressed, coronavirus cases were soaring in New York City, and climbing as well in Boston, Detroit, New Orleans and elsewhere. In a news conference, Gov. Andrew M. Cuomo of New York complained that the federal government had provided only 400 ventilators to the state. “You pick the 26,000 people who are going to die because you only sent 400 ventilators,” Mr. Cuomo said last Tuesday.

Two days later, Mr. Trump disputed the governor’s numbers while calling in to Sean Hannity’s show on Fox News. “I don’t believe you need 40,000 or 30,000 ventilators,” Mr. Trump said. “You go into major hospitals sometimes, and they’ll have two ventilators.”

The federal government hasn’t indicated how many machines the ventilator makers, including G.M. and Ventec, ought to produce, two people familiar with the talks said. Ventec never received a confirmation from the government about which machine it was interested in acquiring, how many it wanted and how much it was willing to spend.