A victory for Ayr would have taken them above Ross County and to the top of the Ladbrokes Championship but an early Nathan Austin double had ICT in command and Liam Polworth quickly added a third goal for the visitors.
Declan McDaid and Lawrence Shankland reduced the deficit after the break but John Robertson's men held on for all three points.