Jamie Stevenson's entry, which incorporates a saltire, their black and white colours and their nickname - The Honest Men, won 48% of the votes.
The Scottish Championship club were forced to find a new crest as their old one broke ancient heraldic law.
Designs were whittled down to a shortlist of five that were voted on by the public.
Commercial manager Graeme Miller told his club website: "Nobody wanted to change our badge.
"However, when left with no option, I think the route we chose to take has been a hugely positively one.
"We visited numerous local schools with our players and mascot Pandamonium and the response from the kids was incredible.
"Hundreds of entries were sent in from local youngsters and hopefully the excitement generated when we visited them will have given them an interest in the club for the future."
Winning designer Stevenson, who has lived in Peru for five years, attended his first Ayr match in 1979 and went on to design the club's match-day programme.
A badge containing an anchor, representing Ayr's proximity to the sea, came second with 25%.
The new badge will be adopted from 1 July.
An Ayr United fan living in Peru has designed the winner of an online poll to choose a new club badge.