A mother bear ferociously attacked a Colorado man in his own garage on Sunday night, wildlife officials said.

The man was hospitalized and needed surgery for severe cuts to his head and legs — but he was expected to survive, Colorado Parks and Wildlife said in a statement released Monday.

The man had stored birdseed and other items that could attract bears in his garage at his house near Steamboat Springs, the statement said.

YELLOWSTONE BEAR CHARGES AT WOMAN WHO APPROACHED WITH PHONE, PARK LAUNCHES INVESTIGATION TO FIND HER

At about 11 p.m. on Sunday he noticed the garage door open and went to close it.

That’s when he saw the bear and two cubs inside, the statement said.

"As the man attempted to slowly back away from the garage, the sow attacked," the statement said.

Wildlife officials and park rangers tracked down the mother bear, which was put down and sent to a lab for a necropsy. The cubs are still on the loose, but officials are looking to trap and relocate them.

"This is an unfortunate reminder that we need to stay vigilant and ‘bear aware’ at all times," Kyle Bond, CPW district wildlife manager, said in the announcement.

"Easy access to food will always override a bear’s natural fear of people, so we humans have to stay on top of keeping all food sources secure."

This was the first attack in the Steamboat Springs area, in the northern part of the state, officials said. But a 39-year-old woman was killed in a bear attack in Durango in the southwest part of the state last month.

CLICK HERE FOR THE FOX NEWS APP

As a result, CPW euthanized a bear and two cubs, then found human remains in the bellies of the mother and one of the cubs.

A hiker in Yellowstone National Park in Montana was attacked Friday by a grizzly bear. The 39-year-old man sustained several injuries but was able to hike out on his own, the Associated Press reported.