SAO PAULO, Dec 19 (Reuters) - Shares of Brazilian airlines rose on Tuesday on investor relief that a government deal to lower ticket prices was not as heavy-handed as some expected, amid President Luiz Inacio Lula da Silva's personal campaign to make airfare more affordable.

Carrier Azul rose over 4% in Sao Paulo trading, while rival Gol gained more than 3%, among the top gainers on benchmark stock index Bovespa, which was up 0.6%.

Both agreed with Lula's government on Monday to cap prices for millions of domestic tickets.

"Our view is the market expected something worse," analysts at Genial Investimentos told clients in a note, adding that the price-capped fares should not "significantly" reduce 2024 yields, an industry pricing gauge.

Still, the Ports and Airports Ministry called the pricing agreement the "first step" of a program to bring down fares, and Lula floated the prospect of legislative action to tackle air travel costs at a 14-year high.

"That is something both government and Senate will have to address, so that we can try and find a solution," the leftist president told an event late on Monday. "There is no explanation for the prices of airfare in this country."

Airlines say the local market reflects a global trend, with heated demand for air travel after the pandemic and supply chain issues affecting planemakers' ability to deliver new aircraft that would increase capacity.

"I'm being called to Brasilia every week because of ticket prices," Azul Chief Executive John Rodgerson told reporters last week. "But ticket prices are based on demand, and the only way to deal with it is bringing in more supply."

In Monday's deal with the government, Azul agreed to sell 10 million tickets for less than 800 reais ($163) next year. Gol will offer 15 million seats for under 700 reais each and Latam pledged to increase its supply of flights in Brazil.

Industry observers are skeptical about how much that will change Brazil's average airfare, currently around 750 reais, the highest since 2009, according to data from local regulator ANAC.

"Customer response to current tariff levels remains positive, with no sign of slowing demand," BTG Pactual analysts said in a note after hosting Azul's management for a meeting, adding the carrier "anticipates no major tariff adjustments."

Both Azul and Gol last month reduced their outlook for total seats available this year.

Azul expects to add 19 new aircraft to its fleet next year but acknowledges that planemakers around the world face major engine supply hurdles, which also increases maintenance costs for carriers.

Gol had a similar complaint last week, blaming the delay in deliveries of Boeing's 737 MAX aircraft for limiting the carrier's growth and putting pressure on its maintenance team.

($1 = 4.8967 reais) (Reporting by Gabriel Araujo Editing by Brad Haynes and Alistair Bell)