Three years ago, Mozilla offered up the prized spot of default Firefox search provider to the highest bidder. The winner was Yahoo, which paid more than $300 million a year for the privilege, and replaced Google as the default. Times have changed.

Google and Mozilla are back together. After 3 years of a 5-year contract with Yahoo, Firefox has dumped Yahoo and has reverted to having Google set as the default search engine provider for the United States, Canada, and most of the world. There are a few exceptions to this. China will have Baidu as the default. Russia, Turkey, Belarus, and Kazakhstan will default to Yandex.

Walking away from the deal with Yahoo has no repercussions for Mozilla, the company will still receive 375 million dollars a year until 2019. Mozilla was able to ink such an attractive deal, because at the time negotiations were going on Yahoo’s CEO, Marissa Mayer was desperate to beat Google at its search game. As a result, Mozilla decided to take advantage of a clause that allowed it to terminate the contract if Yahoo’s new buyer was a good fit for the Mozilla brand. Apparently, Mozilla didn’t want to work with Verizon, which is a boon for Google.

Both Google and Mozilla are mum on the real reasons this partnership rekindled its relationship. While Mozilla is playing nice and credits this to their desire to focus on user experience and performance, it is known that Google paid Firefox. For Google, the cost of returning to Firefox will increase its Traffic Acquisition Costs, which are already at 5.5 billion dollars.

As far as Google, who has a similar deal with Apple, is concerned, the amount it pays to Firefox is just the cost of doing business in a world where search engines are where people go to find information. It’s also an investment in its paid search business, which already makes up a huge chunk of Google’s revenue.