Google has been forced to offer an apology to the Indian Prime Minister after his picture began appearing in an image search for 'top ten criminals'.

Political leaders voiced concern after Narendra Modi's picture began appearing as part of the search, alongside others such as Osama Bin Laden and Ugandan warlord Joseph Kony.

Bosses at Google have now issued an apology, saying specific image searches often throw up bizarre results because of how the pictures are stored online.

Google bosses have apologised to Indian Prime Minister Narendra Modi after his image appeared in image search results for 'top ten criminals'

A spokesman said: 'These results trouble us and are not reflective of the opinions of Google. Sometimes, the way images are described online can yield surprising results to specific queries.'

The image of Mr Modi that appeared most frequently in the Google search is taken from a British news site and features the word 'criminal' in the caption, possibly leading to the confusion.

However, rather than describing Mr Modi as a criminal, the article is actually about Mr Modi's comments on fellow criminal politicians.

Google, like all search engine companies, uses a complex algorithm to return results to any particular search.

While it is not known exactly how the Google algorithm functions, three factors will determine how high up a search any given result features: how long the page has existed for, where key words appear on the page, and how many other pages it links to.

The search engine was unable to say exactly why the image had appeared in that position, but added 'these results trouble us and are not reflective of the opinions of Google'

While this produces fairly reliable results for web searches, image searches can be less predicable.

In an ironic twist, since the story of Mr Modi's picture appearing in the search has spread, it now means that images of him make up the majority of results for 'top 10 criminals'.

Also featured in the search are gangster Al Capone, Ariel Castro, the man who kept three women imprisoned in his home, and former President George W Bush.

This is not the first time that Google has got into trouble with political figures over its search results.

Last month, users searching Google maps for 'n**** house' were redirected to the White House after users hijacked a feature which allows people to make minor changes to their local area.