A 22-year-old Alberta man managed to survive a bear attack this past weekend, but he didn't escape unscathed.

Justin Gambler suffered lacerations to his head and body when a bear charged at him after his all-terrain vehicle became stuck near Calling Lake, located about 200 kilometres north of Edmonton, on Friday night.

"He just charged at me," Gambler told CTV Edmonton upon being released from the hospital. "He was trying to scratch me and swipe at me."

Gambler said he managed to kick the bear in the nose, and that gave him just enough time to escape the attack.

He ran about five kilometres to a nearby road where bear hunters found him. The hunters notified police and drove the young man to his father's home, where an air ambulance picked him up.

"Half of his face was bloody," Gambler's father, Jack Cardinal, said.

Officials say the man was transported to an Edmonton hospital where he was treated for cuts to his head. He received 27 stiches and was released on Saturday.

"I'm grateful that he wasn't any worse," Cardinal said. "It could have been fatal."

Friday's bear attack comes less than two weeks after a 36-year-old Suncor employee was killed by a bear at an oilsands site in northern Alberta.

Lorna Weafer, 36, was an instrument technician who was doing electrical work near Fort McMurray when a bear attacked her on May 7, 2014.

According to experts, fatal bear attacks in North America are very rare. Weafer’s death was the first time since 1991 that someone in Alberta was killed by a black bear.

In 2011, more than 140 bears were shot in Alberta to control the animal’s population. Alberta Environmental says there are approximately 40,000 black bears in the province.

With a report from CTV Edmonton