Mayrhuber's contract had been due to expire at the end of this year, the company said in a brief statement.
A Lufthansa employee since 1970, Mayrhuber led a group that overhauled the carrier in the early 1990s. He took over as chief executive in 2003 after holding a series of posts in the company's technical division, and headed it as an independent company after it was spun off.
Besides shepherding the company's takeover of former rival Swiss International Air Lines, which was announced Tuesday, Mayrhuber has been increasing the company's capital to help it purchase and run Airbus' A380 superjumbo jet.
Lufthansa said last May it would spend 4.72 billion euros ($6.21 billion) over the next three years ahead of the A380's introduction.
The airline said earlier this month that it earned about 400 million euros ($530 million) in 2004, recovering from a loss of 984 million euros the previous year caused by slack air travel and troubles at its U.S. catering business.
Lufthansa shares rose 0.7 percent to 11.16 euros ($14.70) in Frankfurt trading.