A man performed a sexual act on a woman in front of a carriage full of people including a one-year-old child.
Raymond Burr and Deborah Tobyn were riding on the c2c train from London to Basildon in Essex on May 19 last year when they decided to engage in some "lewd behaviour".
With the 6pm sun shining through the window and the couple's intimate moment on show for all to see, a woman approach the pair and asked them to stop.
They declined the invitation, Essex Live reported.
Burr and his 57-year-old partner had been drinking at the time of the incident.
Multiple people witnessed the passionate exchange, including young children and a 12-month-old baby.
The 64-year-old Burr performed two kids of sexual acts on Tobyn.
Patrick Duffy, prosecuting, told the court: "The first witness was with her grandson.
"There were children in the carriage, confirmed by the second witness who said there were children aged between one and six on the train. It was lewd behaviour.
"After the incident, the two got off the train at Pitsea and were stopped by a transport officer. Mr Burr gave his name but Ms Tobyn gave her name as Janet Green.
"Burr was identified and entered his plea at Magistrates' Court on May 23."
Both pleaded guilty to an act of outraging public decency earlier this year.
They were sentenced for their crimes at Basildon Crown Court today.
Judge Samantha Leigh, addressing the court, said: "It's deeply unpleasant but I'm well aware of the age and the lack of previous convictions.
"They are both adults and they are capable of making their own decisions. You were travelling back from London on a c2c train when you engaged in lewd behaviour.
"One of the witnesses had her young grandson with her and could see what was going on. She stood up and spoke to you, she asked you to desist but you didn't.
"There were other children in the carriage and 6pm is a busy time. You were both drinking at the time."
The court heard how Tobyn had been widowed shortly before the incident.
Burr was sentenced to an 18-month community order and was ordered to perform 100 hours of unpaid work, as well as a 30-day rehabilitation requirement.
Tobyn was handed a two-year community order, ordered to undertake 150 hours of unpaid work and was also given a 40-day rehabilitation requirement.