Los Angeles firefighters rescued 15 residents from a high-rise residential building that burst into flames on the city's west side Wednesday. Authorities said two people have been critically injured.

Billows of smoke alerted residents of the danger and sent many scrambling toward the exits, but when flames entered into the stairwells it left some residents trapped.

That's when firefighters decided to execute a risky rooftop evacuation, where one-by-one those in danger were attached to a line and hoisted into a helicopter to be transported to safety. At one point, firefighters lifted a small white dog into the copter, ABC News reported.

"We have rarely done rooftop evacuations for medical purposes. Rarely," Los Angeles Fire Chief Ralph Terrazas said. He added that the strategy, in this case, proved to be "very effective."

An amazing video provided by ABC News shows firefighters rescuing a person stranded near the sixth story of the 25-story building. The individual is seen carefully maneuvering on the edge of the building toward a rescuer on a ladder.

Deputy Fire Chief Armando Hogan recalled that one man was hanging onto the edge of the building and considering jumping when firefighters reached him and pulled him to safety.

Police do not yet know what the caused the fire, but are investigating all possibilities, including arson.

Eight people were injured in the incident, including a 3-month-old child and two men in their 30s for critical injuries, Terrazas confirmed, according to KABC-TV. Most of those patients suffered from smoke inhalation and six have been hospitalized.

There were earlier reports that some people had jumped from the building, but authorities have rebuked that claim.