"Dismissed," said a division bench of Chief Justice R Subhash Reddy and Justice V M Pancholi, while pronouncing the order on the public interest litigation.
Ribeiro had challenged Pandey's appointment as he is an accused in the alleged fake encounter case of Ishrat Jahan and three others, and is currently out on regular bail.
In his PIL, Ribeiro said that Pandey could hamper the investigation and influence witnesses in the Ishrat case.
Ribeiro served as the DGP of Gujarat and Punjab, the latter during the height of insurgency, and is known as super cop for his exemplary work during those periods.
He further stated in the PIL that Pandey's authority and influence of his post will affect witnesses, many of whom are serving police officers under him.
Appearing for the state government, Additional Solicitor General Tushar Mehta said that the PIL should not have been entertained here as it is a service matter.
Mehta said that Pandey has only been given additional charge as he is the senior-most IPS officer and it is not a regular posting.
The government had earlier stated in a written reply before the court that investigation in the Ishrat case was done by the Central Bureau of Investigation (CBI) and not state police, and such apprehension therefore bore no merit.
The government had stated that Pandey was the most suitable IPS officer for the in-charge DGP's post because of his seniority.
Replying to the main contention of PIL about possibility
of Pandey hampering the investigation against him by influencing the witnesses, the government said no such thing has happened after he was made the in-charge DGP.
The government further told the court that nowhere in his bail condition it was mentioned that he cannot be given promotions or cannot be made in-charge DGP.
Pandey was jailed after the CBI, which is investigating the case, charge sheeted him along with other police officials.
Pandey is out on bail in the fake encounter case of Ishrat Jahan and three others. He had spent around 18 months in jail in the case which is at present is pending before a local court in Ahmedabad.
After being released on bail, he was taken back into service in February last year and was made the director of Anti-Corruption Bureau.
On April 16 this year, he took over as in-charge DGP of Gujarat following unexpected transfer of incumbent P C Thakur to Delhi.
Ishrat, a 19-year-old girl from Mumbai, Javed Shaikh alias Pranesh Pillay, Amjadali Akabarali Rana and Zeeshan Johar were killed in an alleged fake encounter on Ahmedabad outskirts on June 15, 2004.
The Gujarat Police had then claimed that the four, with links to Pakistan based Lashkar-e-Taiba, had come to the city to kill the then Chief Minister Narendra Modi.