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, stating that the rise of artificial intelligence (AI) likely contributed to the outcome.

Today's decision recognizes how much the industry has changed through the advent of AI, which is providing more ways for people to find information, Google said in a statement following 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 is also not required 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. Firms like Apple, Samsung, and Motorola will benefit as the decision opens the door for them to promote a range of competing search engines and technologies.

While many see this as a favorable outcome for Google and industry players, competitors like DuckDuckGo argue that it's not sufficient to challenge existing monopolistic behaviors.