The move is likely to spell the end of his Ibrox career for the 22-year-old, who is out of contract in the summer.
He made his debut in May 2017 under former boss Pedro Caixinha and played four times before the end of that campaign. However, he’s made only five appearances since, the last of which came in December of the same year as he came on for Ryan Jack in a 2-0 victory over Motherwell under interim boss Graeme Murty.
He’s since had loan deals at Bury, Raith Rovers and Partick Thistle. The coronavirus pandemic cut the last deal short and he hasn’t featured at all this campaign. Despite his lack of playing time, Rangers chose to extend his deal two years ago.
He now moves to Somerset Park in order to get some regular football under the tutelage of recently-appointed boss David Hopkin.
Hopkin told Ayr’s website: "Jamie is a midfielder who can play anywhere across the middle. He is a very talented young player and has been part of the Rangers first team squad for some time now.
"He is hungry to get games and impress and we want to thank Rangers for their help in getting this deal done. We are delighted to have him and he will provide real competition for places."
Ayr sit in seventh place in the Scottish Championship having managed to avoid defeat in three of their last four matches, including beating Dundee 3-1 in midweek.