Police on Wednesday said a gunman killed a member of Canada’s armed forces near the Parliament building in Ottawa, leading to a lockdown in the area. A suspect was also killed.

The soldier was shot while guarding a war memorial, said officials, who urged residents to stay away from the downtown area of Ottawa due to the “ongoing” operation. The victim’s identity was not released.

Canadian law enforcement officials told reporters that the attack caught them by "surprise," adding that it was too early to say whether there was any intelligence that could have warned them.

They also would not comment on whether the suspect who was killed was previously known to authorities.

Law enforcement officials indicated that security in the area around the legislative buildings had been at the same level on Wednesday morning as it had been for the past several years.

Witnesses reported hearing multiple shots in the area — known as Parliament Hill — and inside the main legislative building.

Many members of the Canadian Parliament were present in the area at the time of the attack. The leaders of the three major political parties, including Prime Minister Stephen Harper, were reported to be safe.

President Obama was briefed on the shooting incident by Lisa Monaco, assistant to the president for Homeland Security and Counterterrorism, a White House official said Wednesday.

The White House said that Obama spoke to Harper Wednesday afternoon. Obama condemned the “outrageous” attacks, according to a White House readout of the call, and offered any assistance Canada needed in responding to the attacks.

A spokesman for the U.S. Capitol Police (USCP) said officers were tracking the events in Canada, but had not made any changes to security on Capitol Hill.

"The USCP remains at a post-9/11 heightened level of awareness, with no significant modification to our security posture,” said spokesman Shennell Antrobus. “The USCP continues to monitor and track the Canadian event."

The gunfire follows an attack targeting soldiers on Monday that the Canadian government said was "clearly linked to terrorist ideology."

According to reports, a man waited in his car outside a building offering support to the Canadian military veterans, before running over two soldiers, one of whom was in uniform. One of the soldiers died.

“This is a terrible act of violence against our country, against our military, against our values,” Canadian Public Safety Minister Steven Blaney said on Tuesday. "What took place yesterday is clearly linked to terrorist ideology."

--This report was last updated at 3:00 p.m.