(CNN) -- A hostage-taking incident in the French city of Toulouse has ended with shots being fired, the gunman being wounded and the last two remaining hostages being freed, police union spokesman Christophe Crepin said Wednesday, about five hours after the incident began.