Masked gunmen in Seattle unloaded a hail of bullets at an apartment building early Wednesday, wounding a mother and narrowly missing her toddler as they slept, authorities said.

The shooting happened around 2:40 a.m. in the 9400 block of 27th Avenue Southwest in West Seattle, according to the Seattle Police Department.

Surveillance video obtained by FOX13 Seattle shows three gunmen in black hoodies firing their weapons indiscriminately in a grassy courtyard, striking the apartment building and shattering windows.

Responding officers learned the mother and her child were sleeping in the same bed when the gunfire pierced their bedroom wall, police said. 

SAVANNAH POLICE ARREST SUSPECT IN WEEKEND SHOOTINGS THAT INJURED 11 IN DOWNTOWN SQUARE

gunmen shooting at apartment building

The bullets went through the mother's bedroom wall and struck her twice in the legs, police said.

The mother was shot twice in the legs, while the toddler was unharmed.

A neighbor told FOX13 that he was asleep when he heard dozens of shots being fired.

3 gunmen shooting at apartment building

Police have not released any details about the suspects or the circumstances leading to the shooting.

"I just thought I was dreaming in the moment and I kind of waited for the sirens to come and fell back asleep," said the neighbor, who asked to remain anonymous. "I feel sad because this neighborhood is very safe, so not sure what happened. Hopefully, she’s doing OK."

SEATTLE MAN ARRESTED IN CONNECTION WITH 9-MONTH-OLD SON'S FATAL SHOOTING

Investigators found dozens of shell casings and recovered several spent bullets at the scene.

boarded up windows at apartment building

The gunmen fired dozens of shots toward the apartment building. (FOX13 Seattle KCPQ)

Detectives were seen carrying bags of spent shell casings from the courtyard, the station reported.

No details about the three suspects were immediately released.

The circumstances leading up to the shooting are under investigation, police said.

CLICK TO GET THE FOX NEWS APP

Authorities asked anyone with information about the shooting to call the SPD Violent Crime Tip Line at (206) 233-5000 or Crime Stoppers at 1-800-222-TIPS.