The men had returned from the UK to spend the holidays with their families.
Brian Gammell (20), from Pound Lane, Rathkeale, Co Limerick, and Roger Boswell (19) of Setchel Grove, Cambridge, England, both pleaded guilty to dangerous driving at Ballinlyny, Rathkeale on Christmas Day.
The two men appeared before Judge Aeneas McCarthy at a special sitting of Limerick district court last week.
The court heard that motorists on the N21 had to take evasive action when the accused raced each other between Newcastle West and Rathkeale, Co Limerick shortly after 3pm on December 25.
The race began at the Reens Pike junction and the two high-powered cars sped off in the direction of Rathkeale, reaching speeds of more than 140kmh along the busy road.
Gardai arrested both men near Rathkeale.
Judge McCarthy heard both Gammell and Boswell – who had no previous convictions – only return home to Rathkeale once a year from the UK where they are working.
The judge said it was a very serious matter which could have put the lives of other road users at risk.
He said it was a miracle nobody was killed during the incident.
Both men were jailed for two months and banned from driving for five years.
Bail on independent sureties was fixed at €1,000 each.
The Irish Independent has learned that both men, who have since been released, are appealing the severity of their sentences.
The cases will be heard at a sitting of Limerick Circuit Court where district court appeals are dealt with.
Brian Gammell's father, Patrick, was also fined €350 after he pleaded guilty to a charge of using threatening and abusive behaviour to a garda officer following the drag race.
Local councillor Stephen Keary said the reckless actions of the two men could have resulted in a serious road accident.
"It is something similar to Russian roulette where you have two people going out on a single lane carriageway with two high-powered vehicles and doing a head-to-head from A to B," he said.
Mr Keary said there was no regard by the culprits for anyone else using the same road on Christmas Day.
He praised the gardai for their response to the incident.
"I'm delighted that such swift action was put in place to deal with it," Mr Keary said.