A teacher tracked down four pupils on Facebook before bombarding them with messages asking for pictures of them in their underwear, a court heard.
Alexander Thomas, 30, allegedly used the social networking site to "gain the trust" of the female students, who studied at the sixth form where he taught.
Swindon Crown Court heard Thomas, of Taw Hill, Swindon, Wiltshire, initially sent the girls, aged between 16 and 17 at the time, "innocuous" messages.
But his correspondence quickly became "sexually explicit" and included repeated requests for pictures of the girls' bodies, it is alleged.
Business studies teacher Thomas is accused of meeting two of his victims, kissing one during a walk and touching another in a jacuzzi.
Thomas denies five counts of inciting a child to engage in sexual activity while in a position of trust and two counts of sexual activity with a child while in a position of trust.
He also denies possessing an indecent photograph of a child.
Prosecuting, Anna Squire told the jury the offences took place between August 31 2010 and October 12 2012.
"The defendant contacted all of these girls via Facebook accounts, starting out with innocuous correspondence, but by gaining their trust he was able to ask them to go beyond what was firstly inappropriate in a relationship between a pupil and a teacher to what was ultimately illegal," Miss Squire said.
"He asked them to send him photographs of themselves in their underwear and asked them to meet up with him for the purpose of sexual activity.
"He was encouraging these girls to behave in a sexual manner towards him. On two of these occasions, actual sexual activity took place."
The jury of seven women and five men was told Thomas began working as a PE and business studies teacher at a school in Wiltshire in 2010.
A short time later, Thomas allegedly contacted a 17-year-old pupil on Facebook, messaging her "Are you alright? I see you round school a lot."
Miss Squire said the pair began communicating on BlackBerry Messenger and met up in a village near to the school.
"It was after this meeting that the defendant messaged her to say come and stay at his home address, where he lived with his parents," she said.
"He told her they would assume she was his girlfriend. She inferred that his intention was sexual."
The girl did not accept the offer, Miss Squire said.
A second pupil allegedly received messages from Thomas shortly after starting at the sixth form in 2011.
"The emails from the defendant were flirtatious then moved on to discussions about her body, in particular her breasts," Miss Squire said.
The girl sent photographs in her underwear but ignored Thomas' requests for topless images, the jury heard.
She allegedly met with Thomas on two occasions, with the teacher touching her indecently, kissing her and asking for sex during a walk.
In 2011, Thomas contacted a third girl before she started at sixth form, via Facebook, and repeatedly asked for photographs of her in her underwear, Miss Squire said.
The girl allegedly sent Thomas five photographs, including one topless image, and he is said to have asked her to meet him in a hotel but she refused.
In May 2011, a fourth girl is said to have received a Facebook message from Thomas asking her to come to school to help him find a piece of her coursework.
She claims to have later received a text from Thomas stating: "We could have fun together :-)".
"He told her she must not tell anyone as his job would be at risk," Miss Squire said.
The pair allegedly met twice at a swimming pool, with Thomas once touching her under her bikini bottoms as they sat in the jacuzzi.
An indecent image of the girl was later discovered on Thomas' computer, the court heard.
Thomas was arrested by police in October 2012, after teachers at his school became aware of rumours circulating between pupils.
In police interview, he admitted being in contact with the four girls and receiving photographs of them but denied any sexual contact.
Miss Squire said Thomas claimed he may have asked the girls to send the images while he was drunk.
The trial, expected to last for six days in front of Judge Tim Mousley QC, continues.