Two junior high students from Marystown, on Newfoundland's Burin Peninsula, are thanking comedian Rick Mercer for helping them get to a national science fair in Fredericton next month.

Riley Farrell and Kathryn Ross, two best friends who won their regional science fair, received an invite to the national fair but were required to raise their own funds to get to New Brunswick for the Canada-Wide Science Fair.

Science teacher Matthew Peddle suggested that Farrell and Ross start an IndieGOGO campaign to raise money to travel to Fredricton. (CBC)

At the recommendation of their science teacher Matthew Peddle, the girls started an online fundraising campaign through the IndieGOGO service.

The girls determined that they needed $2,600 to make the trip, and were somewhat disheartened when they only had reached $637 after 18 days.

However, a colleague of Peddle's sent the link to Rick Mercer, who donated $200 and retweeted the link.

From there, the funds started rolling in.

"That's when it just blew up and my wife just started yelling, 'We're at $1,200, and I just sat there refreshing, refreshing, watching it just go up," Peddle told CBC News.

"I was like, 'this is the moment,' and I was so excited to go to school the next day so I could look at them and say, 'We're done.'"

$5 bucks $10 lets send 2 young women from Marystown NL to National Science Fair' <a href="http://t.co/t5PBFGb7vF">http://t.co/t5PBFGb7vF</a> … <a href="https://twitter.com/hashtag/indiegogo?src=hash">#indiegogo</a> via <a href="https://twitter.com/Indiegogo">@indiegogo</a> —@rickmercer

Ross said when she went online and saw what was happening, she couldn't believe it.

"I was on Twitter, I was reading all the tweets and I was running around my house," she said.

Rick Mercer put some social media muscle behind the Marystown students' campaign. (Doug Steele/CBC)

"I was telling everybody that had like two seconds, 'oh my gosh we got enough money now' — I was really excited about it."

Peddle said he had met Mercer once before while on a trip to the national fair, and never dreamed that the St. John's comedian would one day step in to help out his students.

"[Mercer] said 'I met a teacher at an airport on the way to the Canada-Wide Science Fair and he was so enthusiastic and the kids were so amazing that I just wanted to help out'," Peddle said.

"It wasn't until it later that it clicked that it was me he was talking about."

This is a picture of <a href="https://twitter.com/rickmercer">@rickmercer</a> and I from 3 years ago. We ran into him on our way to <a href="https://twitter.com/hashtag/CWSF?src=hash">#CWSF</a> in Charlottetown. <a href="http://t.co/SerMbdFILF">pic.twitter.com/SerMbdFILF</a> —@MrPeddle1

Rick Mercer emailed CBC, saying he is proud of Farrell and Ross, and Riley and that his donation and involvement in the campaign was a small price to pay if, down the road, the province ends up with a few Nobel prize winners.

Farrell said the two can't express enough how appreciative they are to have Mercer's help.

"I would just say thank you so much and it's an honor that he would do this for us," she said.

"He's a celebrity and we're like from a small school, and it's an honor to have him involved with it."