NAMPA -- Fire officials are crediting smoke detectors for rousing the sleeping residents of a home that caught fire in Nampa early Tuesday morning.

The blaze started at about 4:30 a.m. in the 8000 block of East Ravalli Court, near the Cherry Lane and Franklin Boulevard intersection.

Nampa Fire Battalion Chief Dave May said two residents were inside the home when it caught fire, but both were able to get out of the house and call 911.

"They woke up to the sound of the smoke detectors, which is exactly what is supposed to happen," he said.

May said firefighters arrived at the two-alarm blaze to find flames coming from the attic, garage, and an upstairs bedroom. An RV parked next to the house was also fully engulfed.

Crews worked quickly to keep the flames from spreading to nearby homes. The RV was fully destroyed, and the house will need significant repairs, May said.

"It will take some time before [the residents] are back in, but a lot of the contents were saved," he said.

One of the residents was treated on scene for smoke inhallation, but did not need to be taken to the hospital.

The cause of the fire and where it started are still under investigation. The fire is out, and fire investigators are on scene now working to determine what happened.

May said the situation highlights the importance of making sure smoke detectors are functioning properly.

"The smoke detectors did their job - they had fresh batteries, everything worked," he said. "It would have been a different scenario, a different outcome if they did not have those."