Google will not have to sell its Chrome web browser but must share information with competitors, a US federal judge has ordered.

The remedies decided by District Judge Amit Mehta have emerged after a years-long court battle over Google's dominance in online search.

The case centred around Google's position as the default search engine on a range of its own products such as Android and Chrome as well as others made by the likes of Apple.

The US Department of Justice had demanded that Google sell Chrome - Tuesday's decision means the tech giant can keep it but it will be barred from having exclusive contracts and must share search data with rivals.

Google had proposed less drastic solutions, such as limiting its revenue-sharing agreements with firms like Apple to make its search engine the default on their devices and browsers.

On Tuesday, the company indicated that it viewed the ruling as a victory and said the rise of artificial intelligence (AI) probably contributed to the outcome.

Today's decision recognizes how much the industry has changed through the advent of AI, which is giving people so many more ways to find information, Google said in a statement after the ruling.

Last year, Judge Mehta ruled that Google had used unfair methods to establish a monopoly over the online search market, actively working to maintain a level of dominance to the extent it broke US law.

But in his decision, Judge Mehta said a complete sell-off of Chrome was a poor fit for this case.

Google will also not have to sell off its Android operating system, which powers most of the world's smartphones.

Shares in Alphabet, Google's parent company, jumped by more than 8% after the ruling.

Before the ruling, Google paid firms billions of dollars to exclusively pre-load or promote its products. Now, Google will not be allowed to enter into any exclusive contracts for Google Search, Chrome, Google Assistant, or the Gemini app.

However, Google will continue paying distributors for default placement. Judge Mehta's ruling doesn't seem to be as draconian as the market was expecting, said Melissa Otto, head of research at S&P Global Visible Alpha.

The decision is not the end of the tech giant's court battles, with a separate case concerning illegal monopolies in online advertising technology set to commence later this month.