Spanish lawmakers are due to vote Tuesday on whether to endorse the formation of a Socialist-led coalition government, ending almost a year of political limbo for the eurozone’s fourth-largest economy.

Parliament must decide whether to give its blessing to a proposed government led by the center-left Socialist party, with the left-wing United We Can party as junior partner.

The confidence vote was forecast to be extremely close, but Socialist leader Pedro Sánchez's administration was widely expected to be elected by 167 votes to 165. Eighteen other lawmakers were expected to abstain.

Spain's interim Prime Minister Pedro Sanchez pauses while addressing the Spanish Parliament in Madrid, Spain, Sunday, Jan. 5, 2020. Sanchez is facing the first of two opportunities Sunday to win the endorsement of the Spanish Parliament to form a left-wing coalition government. It would be Spain's first coalition government since the return of democracy following the death of dictator Francisco Franco in 1975. (AP PhotoManu Fernandez)

Spain's interim Prime Minister Pedro Sanchez pauses while addressing the Spanish Parliament in Madrid, Spain, Sunday, Jan. 5, 2020. Sanchez is facing the first of two opportunities Sunday to win the endorsement of the Spanish Parliament to form a left-wing coalition government. It would be Spain's first coalition government since the return of democracy following the death of dictator Francisco Franco in 1975. (AP PhotoManu Fernandez)

Sánchez has been caretaker prime minister since early last year. His expected narrow margin of victory has raised doubts about how long the coalition government will last, as its policies require parliamentary approval.

Sánchez's Socialists won two consecutive general elections last year, but both times they failed to capture a parliamentary majority. That meant they couldn’t win the parliamentary confidence vote that is required before taking office.

The country has been run by Sánchez’s caretaker government for close to a year, and Tuesday's ballot of lawmakers is his latest attempt to take office.

Spain's interim Prime Minister Pedro Sanchez leaves the Spanish Parliament in Madrid, Spain, Sunday, Jan. 5, 2020. Sanchez has failed on his first two chances to win the endorsement of the Parliament to form a coalition left-wing government but will have a second chance Tuesday. (AP PhotoManu Fernandez)

Spain's interim Prime Minister Pedro Sanchez leaves the Spanish Parliament in Madrid, Spain, Sunday, Jan. 5, 2020. Sanchez has failed on his first two chances to win the endorsement of the Parliament to form a coalition left-wing government but will have a second chance Tuesday. (AP PhotoManu Fernandez)

In weeks of negotiations since the last election in November, Sánchez apparently has mustered enough support — or promises to abstain — from a handful of small regional parties to take power.

Most doubts have been raised by the abstention deal clinched with the regional Catalan ERC party, one of several groups that want Catalonia’s independence from Spain and which holds 13 seats. Most opposition parties have lambasted Sánchez for striking deals with parties that want to break up Spain.

The Catalan independence push has been Spain’s most serious political crisis in decades.

Spain's interim Prime Minister Pedro Sanchez, lower left, applauds with other deputies at the Spanish Parliament in Madrid, Spain, Sunday, Jan. 5, 2020. Sanchez is facing the first of two opportunities Sunday to win the endorsement of the Spanish Parliament to form a left-wing coalition government. It would be Spain's first coalition government since the return of democracy following the death of dictator Francisco Franco in 1975. (AP PhotoManu Fernandez)

Spain's interim Prime Minister Pedro Sanchez, lower left, applauds with other deputies at the Spanish Parliament in Madrid, Spain, Sunday, Jan. 5, 2020. Sanchez is facing the first of two opportunities Sunday to win the endorsement of the Spanish Parliament to form a left-wing coalition government. It would be Spain's first coalition government since the return of democracy following the death of dictator Francisco Franco in 1975. (AP PhotoManu Fernandez)

The Socialists defend the deal, saying the Catalan crisis must be resolved through talks, something they have agreed to do with the ERC.

Sánchez tried Sunday to obtain an absolute majority of 176 votes, but he fell far short of the threshold. In this second round of voting, he needs only a simple majority in his favor — more votes for him than against him — to win the ballot.

King Felipe VI asked Sánchez to try and form a government following the Nov. 10 ballot, when the Socialists got the most votes but only 120 seats in the 350-seat Chamber of Deputies, Spain's parliament.

Spain's interim Prime Minister Pedro Sanchez speaks at the Spanish Parliament in Madrid, Spain, Sunday, Jan. 5, 2020. Sanchez is facing the first of two opportunities Sunday to win the endorsement of the Spanish Parliament to form a left-wing coalition government. It would be Spain's first coalition government since the return of democracy following the death of dictator Francisco Franco in 1975. (AP PhotoManu Fernandez)

Spain's interim Prime Minister Pedro Sanchez speaks at the Spanish Parliament in Madrid, Spain, Sunday, Jan. 5, 2020. Sanchez is facing the first of two opportunities Sunday to win the endorsement of the Spanish Parliament to form a left-wing coalition government. It would be Spain's first coalition government since the return of democracy following the death of dictator Francisco Franco in 1975. (AP PhotoManu Fernandez)

His administration would be Spain's first coalition government since the country returned to democracy in 1978, three years after the death of long-time dictator Gen. Francisco Franco.

Sánchez and pony-tailed United We Can leader Pablo Iglesias say they want to raise income tax for high earners and capital gains tax.