Mankato police say a standoff with a 29-year-old man accused of abducting his 2-year-old son has ended peacefully, with both father and son safe after almost two days and gunfire exchanged.

The Mankato Police Department ended the standoff late Thursday morning. Walter Brown and his son, Koran Brown, were taken to a local hospital for evaluation. Police may recommend further charges against Walter Brown pending investigation.

Mankato police did not release any further details as of Thursday afternoon.

The standoff began about 4:45 p.m. Tuesday in the 2200 block of Marwood Drive after police tried to arrest Brown, who is charged with taking Koran on March 24 and threatening Koran's mother.

Brown fired a gun at an officer as he fled into an apartment building, according to police. The officer was not injured.

Brown was charged in Blue Earth County District Court with deprivation of parental rights and violation of a no-contact order.

According to court documents, Koran's mother contacted police on March 29 and said Walter Brown took off with the child. She has custodial rights to Koran and two other children she and Brown share together. She said Brown entered the apartment through a sliding glass door after she refused to let him in the front door. Brown grabbed Koran and some of the boy's clothes and walked out.

The mother said she started "blowing up his phones," and Brown would reply with threats and suggested he would kill himself. Eventually, he ignored her calls and blocked her on social media. She said it looked like he came back and retrieved more of Koran's clothes and other belongings.

The no-contact order stems from charges that a drunken Brown grabbed a knife and threatened to kill his children and their mother in August in the family's home. He went on to stab holes in the wall and a door, according to felony assault charges.

The mother called 911 as Brown was breaking a toilet, the bathroom mirror and other items, the charges read. Brown violently resisted the officers, at one point kicking one of them in the chest, until he was subdued and arrested, the criminal complaint continued.

Star Tribune staff writer Paul Walsh contributed to this report.