Fiat automobiles are displayed on the showroom floor of the Fiat of North Miami store on July 3, 2012 in North Miami, Florida. - 

The Italian carmaker Fiat has reached a deal to buy the rest of American automaker Chrysler, something it has wanted to do for years.

“The main reason is it will allow them to fully integrate as one company,” says Michelle Krebs, senior analyst with Edmunds.com.

Fiat hopes the deal will make it easier for them to compete with companies like Toyota and Volkswagen. Perhaps more importantly, Fiat desperately needs some of Chrysler’s cash.

According to analyst Dave Sullivan, with AutoPacific, Europe’s anemic economy hasn’t been good for auto sales.

“Chrysler is really helping to keep Fiat afloat during these difficult times,” he says.

Fiat’s relationship with Chrysler goes back to 2009, when Chrysler was in bankruptcy.

“I mean, you could say that Fiat was basically gifted a stake in Chrysler,” Sullivan says.

The rest of the company went to the UAW Retiree Medical Benefits Trust, which had considered an IPO to sell its shares.

With this agreement, that won’t happen. The UAW will sell its ownership stake in a deal valued at more than $4 billion.

Follow David Gura at @davidgura