Wednesday's match between Black Sea team Trabzonspor and Gaziantepspor ended in a 2-2 draw but the crisis erupted after referee Cagatay Sahan ordered extra time when Trabzonspor had expected a penalty.
The decision caused uproar among the home team fans.
Sahan and three assistants were held captive for four hours at Trabzonspor's Avni Aker stadium on the orders of team president Ibrahim Haciosmanoglu -- who was in Istanbul at the time, the Milliyet newspaper reported.
The referees and several representatives of the Turkish Football Federation were locked in their room at the stadium by club officials, only to be freed after a late night phone call from President Recep Tayyip Erdogan.
More From This Section
"Let's not cause a scandal before both Turkey and the world," Erdogan told the club boss, according to the Dogan News Agency.
The referees were given a police escort from the stadium but a group of fans waiting outside hurled bottles and stones at them, the media reported.