A disgruntled former employee walked into a Walmart in Mississippi on Tuesday and opened fire on supervisors, killing two people in an early-morning attack that ended in a shootout in the store’s parking lot, officials said. The gunman and a police officer were also injured, according to the authorities.

The police responded around 6:30 a.m. to reports of a gunman at a Walmart in Southaven, Miss., on the border with Tennessee.

Mayor Darren Musselwhite of Southaven said that a “disgruntled” employee set off chaos at the store, lighting a fire inside and taking aim at a supervisor. The gunman went out a side door chasing a store manager, who was killed in a parking lot, Mr. Musselwhite said.

The authorities responded to the Walmart within three minutes of the first 911 call and found the gunman in the parking lot, Chief Macon Moore of the Southaven Police Department said at a news conference.