Hayley Williams, 47, of Oxford Street, Preston, and Matthew Dusic, 36, of Bootle Street, Preston, were seen in the throes of passion by a witness who was clearing rubbish from the grounds of Preston Minster on Church Street, on October 4.
Preston Magistrates' Court was previously told Dusic had initially lied to police when confronted because he had another "lady friend" at the time and did not want her to find out.
But both later admitted outraging public decency and their case was adjourned until now for pre sentence reports to be written.
Dylan Wagg, prosecuting, said: "It's a large church in the city centre opposite the Twelve Tellers and is a popular location in terms of pedestrians passing by all the time.
" The witness says he saw them engaging in sexual intercourse in the church grounds near one of the walls.
"Accordingly, outraged by this, he informed police and they attended the scene.
"There were a large number of people out at that time of night, at that stage.
He said the police saw the defendants sitting against the wall talking to each other, and a group of young girls close by.
They denied the offences had occurred.
The court was told Dusic has four convictions for four offences, while Williams has four convictions for nine offences.
Mr Wagg pointed out children could have potentially been present as it is in a busy area.
A probation officer addressed the court about Hayley Williams.
She said she had a said long standing heroin addiction and had been homeless the last few months after leaving an abusive relationship.
She said she was currently on a methadone prescription and is now in supported housing, but is behind with her rent and receives £140 Universal Credit per fortnight.
Defending, Steve Scott said: "It's not type of offence one can mitigate - it is what it is.
"They are both thoroughly ashamed of what they did. They recognise their behaviour was entirely inappropriate and both were under the influence of substances at the time which may have affected their decision.
"Thankfully it's a one off offence for both of them.
"They are not in a relationship and both live independently of each other.
" Both recognise they need help."
He added she had confessed straight away while Dusic, who had a girlfriend at the time, didn't "through shame".
Williams was given a community order for 12 months, including a 40 day rehabilitation requirement and three months of drug treatment.
Dusic was given a community order for six months, including six months of alcohol treatment, and a curfew.