(Reuters) -- United Continental Holdings Inc. said late Monday that its general counsel Brett Hart would take over as acting chief executive officer while CEO Oscar Munoz goes on medical leave, following a heart attack he suffered last week.

United, the second-largest U.S. airline by capacity, said the change was effective immediately. It said it is too soon to know the course of treatment Munoz will take or the timing of his recovery.

In a news release, Hart vowed to continue an agenda Munoz has set to improve customer service, employee teamwork and innovation. Munoz, 56, assumed the top job at United last month and met with workers and air travelers across the United States for input on how to improve the airline.

Hart, who joined United in 2010, was responsible for government and regulatory affairs, corporate real estate, security and customer experience in his prior role of executive vice president and general counsel, United said.

The news marks the second leadership transition at United in the past two months. Munoz became CEO in September after Jeff Smisek resigned from the job in relation to internal and federal probes into United's relationship with the Port Authority of New York and New Jersey.

The news also marks the first acknowledgement by the company that Munoz suffered a heart attack on Thursday.

(Reporting by Ankit Ajmera in Bengaluru and Jeffrey Dastin in New York; Additional reporting by Ross Kerber; Editing by Jeffrey Benkoe, Christian Plumb and Bernard Orr)