A Baton Rouge man accused of shooting another man in the legs and trying to rob him in December has been arrested, according to an arrest warrant.

Joseph Nelson, 26, 323 S. 16th St., was booked Thursday with attempted second-degree murder and armed robbery by the Baton Rouge Police Department, parish jail records show.

According to the warrant, police responded to a shooting in the 400 block of South 17th Street on Dec. 11.

The victim told police he was walking down the street when he was approached by someone he didn't know who demanded money from him, the warrant said.

The victim told police he turned to walk away and was then hit in the head with something. The victim turned and saw the man had a handgun, according to the warrant.

The victim ran away but the armed man fired the gun several times and hit the victim in the legs.

Police were able to identify Nelson through the victim's description and a Crime Stoppers tip.