"The BEST dog in the world" is credited with saving a Lower Hudson Valley church that was nearly destroyed in a fire.

On Sunday around 12:45 a.m. Kim Lewis' German Shepherd, Bear, barked to get her attention. The dog was barking because the church across the street was on fire.

"We want to thank God first and foremost followed by, the countless first responders that came to help, and finally, Bear, the BEST dog in the world for keeping us from experiencing a devastating loss here at the church," Yorktown Assembly of God wrote on Facebook.

Lewis was able to call 911 and firefighters rushed to Yorktown Assembly of God Church on Mahopac Avenue.

Arriving firefighters noticed flames from the front of the building. Somers crews quickly worked to extinguish the flames from the outside before making an interior attack to put out the fire that had spread to the attic, officials say.

Upon the arrival of mutual aid companies, crews were able to put the fire out in about 20 minutes.

The cause of the fire was determined to be accidental and electrical in nature by the Westchester County Cause & Origin team.

"We know God was there tonight protecting our building. The fire started on the exterior of the building and was just starting to spread through the attic above the sanctuary before the firefighters were able to put out the flames," Yorktown Assembly of God wrote on Facebook.

Fire officials believe the church would have been destroyed if Kim Lewis called 911 only five minutes later.

"There is damage to the roof and exterior of the building, as well as water damage in the sanctuary, but we are so thankful as it could have been so much worse. We know that it was not luck, it was God's protection over His church and people," Yorktown Assembly of God added.

Photos: Lower Hudson Valley Church Nearly Destroyed By Fire

"The BEST dog in the world" is credited with saving a Lower Hudson Valley church that was nearly destroyed in a fire. 

33 'Most Wanted' in New York

Authorities across New York State, including the FBI, have identified these people as its "Most Wanted Fugitives." Officials ask for help in finding them but warn they should be considered "armed and dangerous."

Mustang Pinned Under Tractor-Trailer Near I-84 in Hudson Valley

A Mustang crashed into a tractor-trailer near I-84 in the Hudson Valley. 

More From WPDH-WPDA