Ottawa police have charged two men after a SWAT team had to be called in to deal with the dangerous use of a weapon.

Police officers responded just before 3 a.m. Tuesday after pellets struck a pedestrian and an Ottawa fire truck in the area of Wellington Street West and Holland Avenue.

The men, both 36, are now charged with the following offences:

Pointing a firearm.

Possession of a weapon for a dangerous purpose.

Assault with a weapon

Discharging a firearm with intent.

The police investigation led the officers to a sixth-floor apartment at Wellington Towers, the same building where a fire alarm had gone off earlier. The fire truck was at the scene due to the earlier fire alarm.

Apartment residents were on the street after the building was evacuated due to the alarm. That is when an elderly man, 70, suffered a bruise to the chest from a pellet and was treated at the scene by paramedics.

Two men in their mid-30s were arrested after a pellet gun incident in Ottawa early Tuesday. (CBC)

Police had to call in a SWAT team as they tried to negotiate with two men in their mid-30s who were in the apartment and had a pellet gun.

The men were eventually arrested and the gun was recovered. The building's property manager viewed the security footage Tuesday to see if the men were residents of Wellington Towers.

One apartment resident said she could see firefighters search for the pellet in the elderly man's chest from her television, which airs the building's security footage.

The fire truck suffered minor damage.

The owner of a dry cleaning store across the street from the apartment also claimed the men shot at his front store window on Feb. 9 off and on, over the span of an hour. The owner did not report the incident to police.

Both men are set to appear in court Wednesday.