Google has been fined a record €4.34bn ($5bn; £3.9bn) over Android.

The European Commission said the firm had used the mobile operating system to illegally "cement its dominant position" in search.

The firm's parent Alphabet has been given 90 days to change its business practices or face further penalties of up to 5% of its average global daily turnover.

It has said it plans to appeal.

However, it could easily afford the fine if required - its cash reserves totalled nearly $103bn at the end of March.

At a press conference in Brussels, Competition Commissioner Margrethe Vestager said consumers needed choice.

And she suggested the ruling could lead manufacturers to sell smart devices using different versions of the Android operating system to Google's, such as Amazon's Fire OS, which she said they had been prevented from doing.

"This will change the market place," she said.

Google's chief executive Sundar Pichai has blogged in response.

"Rapid innovation, wide choice, and falling prices are classic hallmarks of robust competition and Android has enabled all of them," he wrote.

"Today's decision rejects the business model that supports Android, which has created more choice for everyone, not less."

Ms Vestager previously fined Google €2.4bn ($2.8bn; £2.1bn) over a separate probe into its shopping comparison service - a ruling the tech firm is in the process of appealing against.

In addition, her team has a third investigation underway into Google's advert-placing business AdSense.

What is the case against Google?
Ms Vestager alleges that there are three ways that Google has acted illegally:

it required Android handset and tablet manufacturers to pre-install the Google Search app and its own web browser Chrome as a condition for allowing them to offer access to its Play app store

it made payments to large manufacturers and mobile network operators that agreed to exclusively pre-install the Google Search app on their devices

it prevented manufacturers from selling any smart devices powered by alternative "forked" versions of Android by threatening to refuse them permission to pre-install its apps

Ms Vestager acknowledged that Google's version of Android does not prevent device owners downloading alternative web browsers or using other search engines.

But she said that only 1% of users downloaded a competing search app, and 10% a different browser.

"Once you have it, it is working, very few are curious enough to look for another search app or browser," she said.

What does the regulator want Google to do now?
The Competition Commissioner said that Google carried out its abuse at a time when the mobile internet was growing quickly, helping it ensure that its advertising-supported search service repeated the success it had already found on desktop computers.

She cannot turn the clock back, but said the size of the fine had been based on the firm's search-related earnings from Android devices in Europe since 2011.

She has, however, said the firm must now stop all of the practices outlined above and refrain from any measures with a similar goal.

Russia may give one example of how this could be achieved.

After similar complaints by the country's regulator, Google now offers Android users a choice between Google, Yandex and Mail.ru as the default search engine the first time they use the Chrome browser.

Yandex in particular has benefited from this.

Since the change in June 2017, the Moscow-based firm has seen its share of mobile search rise from about 34% to 46%, according to Statcounter.

What has the reaction been?
The European Commission first began scrutinising Android in April 2015, after a complaint by Fairsearch - a trade group that originally included Microsoft, Nokia and Oracle among its members.

It claims the case has dragged on for so long because Google had used "every trick in its book to delay action".

But the group welcomed the commissioner's intervention.

"This is an important step in disciplining Google's abusive behaviour in relation to Android", said spokesman Thomas Vinje.

"It means that Google should cease its anti-competitive practices regarding smartphones, but also in other areas - smart TVs in particular - where it is foreclosing competition by using the same practices."

A trade body representing mobile operators has also greeted the development.

"This will enable consumers to benefit from a greater choice of mobile services, and allow more players to innovate and offer new services in the market," said the GSMA's chief regulatory officer John Giusti.

How has the EU punished others?
The European Commission had the power to fine Google up to 10% of its annual revenue. Based on its last annual report, that would have amounted to a maximum of $11.1bn (£8.5bn).

The €4.3bn figure is, however, a record-sized sum for the commission.

Earlier punishments include:

fines totalling €3.8bn against several truck-makers accused of price collusion, which were imposed in July 2016 and September 2017

the €2.24bn fine against Google for promoting its own shopping comparison service at the top of its search results, which was announced in June 2017

two fines totalling €1.46bn against Microsoft related to the bundling of its Explorer browser with Windows, and failing to keep a pledge to provide users with a choice of other browsers. The two penalties were announced in February 2008 and March 2013

a €1.35bn collective fine against several car glass producers, which had been accused of illegally sharing commercially sensitive information. This was made in November 2008

a €1.06bn fine against Intel, which was accused of offering discounts to computer-makers that avoided rivals' computer chips. It was announced in May 2009

a €997m fine against Qualcomm, which was penalised over claims it had paid Apple to use its chips. This was announced in January 2018