Two black bears attracted by trash were shot and killed on July 4 in an Eagle River campground and outside an Anchorage Hillside home, officials said.

A third black bear was lured by food and garbage to a tent in Anchorage's Centennial Park, police said. A 911 caller reported the bear was on top of the tent and a woman might be inside. The woman wasn't hurt and the bear got away.

The incident prompted Anchorage police to issue a warning that it's against the law to leave food and trash out in a way that attracts wildlife. Police also reminded residents to secure their garbage as well as barbecue grills and fish guts.

"Keep your yard clean," police said in a dispatch. "Use electronic fences for all livestock such as chickens and beehives."

"If (bears) come into town and they're not rewarded, they're not likely to be sticking around," said Ken Marsh, a spokesman for the Alaska Department of Fish and Game. "There's no reason for them to go through a neighborhood if there's no reward."

By 11:30 a.m. Wednesday, Fish and Game had already received at least three reports of black bears in Anchorage trash, Marsh said.

"We could really reduce those calls by cleaning up our act," he said.

Last month, two bears were shot dead in separate incidents in Eagle River.

The first black bear shooting Tuesday happened shortly after 7 a.m. at the Eagle River Campground, a mile south of downtown Eagle River.

Tom Harrison, superintendent of Chugach State Park, wrote in an email Wednesday morning that a park ranger told him he was patrolling the campground when he found a bear with a bag of trash. He shot beanbags at the bear and it left. The ranger cleaned up the trash, Harrison wrote.

"Bear returned 8-10 min. later, demonstrated aggressive behavior. Bear then put down," he wrote.

On Tuesday, the second bear report came in at 7:33 a.m.

When officers responded to Centennial Park in Muldoon, they found a crumpled tent with a sleeping bag inside. Food and trash were scattered around the tent and the bear was gone, police said. The tent was in the woods, not inside the park's campground, according to a neighbor and campground staff.

Police said they tried to make verbal contact with the tent occupant "without success." When officers poked the sleeping bag, a woman stuck her head out. She told them she was playing dead to prevent the bear from hurting her, according to police.

Police said the woman was cited for "feeding of game" because of the food and trash in the area.

The third report came in just after 3 p.m. Tuesday, according to Anchorage police. A homeowner had shot a black bear sow on the 7700 block of McLure Circle, off Hillside Drive.

The homeowner, whom police did not identify, told officers he was in the process of "re-securing his trash trailer" when he saw the sow and three cubs in his yard with trash.

"He said (he) was able to scare off the bears with an air horn. He said he then grabbed a gun and went back out to pick up the trash left behind by the bears. When he noticed the bears had returned, he sounded the air horn for a second time, and at that time, he said, the sow charged him," according to a police summary. "He said he then fired his gun and shot and killed the bear."

Police said the cubs remained in the area but eventually left. No one was injured and no citations were issued, according to police.

Marsh said at this point, both July 4 bear shootings were considered in "defense of life or property."

Dave Battle, Anchorage area wildlife biologist for Fish and Game, said in an interview last week that the state agency was responding to "a lot of" reports of bears in Anchorage, many involving trash. He said he didn't have the total number of reports because the agency received them in various ways, including by text message, phone call, email and through a reporting form on the department's website.

"We're barely keeping our heads above water with the bear reports that are coming in," Battle said last Thursday. "It's very difficult to get to all of them and a majority of all of them involve people's trash — continuously."

He encouraged people to take photos if they notice neighbors who frequently leave their trash out unsecured. They could be used as evidence to cite the homeowner.

"There's nothing in particular that makes a bear a trash bear and everyone else is a good bear," Battle said. "They're all opportunist. The answer is cleaning up the neighborhood."