By Alonso Soto

BRASILIA (Reuters) - Brazilian lawmakers will vote on Wednesday to elect a new speaker of the lower house of Congress, in a hotly contested race that is crucial for interim President Michel Temer's efforts to approve unpopular economic reforms.

The election to replace former speaker Eduardo Cunha, who quit last week as he faces expulsion over ethics violations, has pitted Temer's allies in Congress against each other and exposed the fragility of his legislative coalition.

Cunha, who is the target of several graft investigations involving state oil company Petrobras, was a powerful speaker who used his influence to push for the suspension of President Dilma Rousseff in May on charges of doctoring public accounts.

Rousseff was replaced by Temer, her vice president, pending an impeachment trial in the Senate that is expected to run into August, when more than two-thirds of senators are expected to vote for her permanent removal.

Although none of the 14 candidates for speaker are expected to wield the same power as Cunha, the new speaker will be crucial to the government's efforts to cap public spending and open up the economy.

"For Temer, this election is extremely important because the speaker sets the agenda and the pace of the lower house," said Humberto Dantas, a political scientist and partner with the E4 consultancy in Sao Paulo. "It's unlikely that any of the main candidates would cause major problems for Temer, but they will demand a lot from him to maintain support."

Analysts say the three strongest candidates are Rogerio Rosso, the leader of the centrist Social Democratic Party, Rodrigo Maia of the right-leaning Democrats party, and a last-minute nominee from Temer's own Brazilian Democratic Movement Party, Marcelo Castro, the largest party in Congress.

The election is scheduled to start Wednesday afternoon, and will go to a second round if the leading candidate does not secure more than a simple majority in the 513-member lower house.

The surprise candidacy of Castro, who was a minister under Rousseff and voted against her impeachment, has raised concerns in the government that he could give the opposition more sway, a presidential aide said, requesting anonymity to speak freely.

Rosso, who was briefly the governor of the federal district where the capital Brasilia is located, is considered a Temer ally who could fast-track key reforms.

(Reporting by Alonso Soto; Editing by Jonathan Oatis)