UPDATE: Authorities identified the 33-year-old burglary suspect as Willie Allen Boudry. He was charged with burglary of a habitation with intent to commit assault, and his bond is set at $20,000.

(Original Story)

A 63-year-old man, who hours earlier had given a 33-year-old homeless man food and money, shot him after he tried to break into his apartment armed with a knife, San Antonio police said.

The homeless man suffered a leg wound and was taken to University Hospital in fair condition, police said.

Ralph McKinley said he was asleep when around 1 a.m. Thursday, he heard the homeless man banging and kicking the door to his unit at the Gates of Capernum Apartment Complex on Waters Edge Drive

Fearing for his life, McKinley said he grabbed his 9 mm Smith and Wesson pistol and fired a warning shot out the window.

McKinley shot the man, who was holding a large butcher knife, after he kicked in the door and came inside the unit, police said.

RELATED: Southeast Side man robbed, forced to the ground and shot, police say

RELATED: 19-year-old shot in abdomen tells police he knows gunman, but won't say who shot him

McKinley said he met the man, who he calls a "good kid," in church, and has known him for about five years.

McKinley said he doesn't know why he broke into his unit because he gave him $20 Wednesday evening after he found him sleeping outside. He sent the man away in a cab because some people were going to come by the apartment Thursday to certify him for medical benefits.

Despite what happened, McKinley said it won't stop him from helping others.

"God told me to help, so I will help," he said.

Outbrain