HARRISBURG, Pa. (AP) - A member of the U.S. Marshals Service was shot and killed early Thursday while serving a warrant, the mayor of Harrisburg said.

Two other officers were also shot, including a Harrisburg police officer who "bravely returned fire and critically injured the gunman," Mayor Eric Papenfuse said.

York City Police said one of its officers was shot and was taken to a hospital for treatment of non-life-threatening injuries. The condition of the Harrisburg officer was not known.

Federal authorities planned an afternoon news conference to provide more details.

"No words can adequately express the sadness we feel at this moment as we contemplate the loss of yet another law enforcement officer in the line of duty," Papenfuse said. "I extend my sincerest condolences to the family of the slain U.S. marshal, to his colleagues and to all law enforcement officers who risk their lives each day to protect and to serve our city and our nation."

Dauphin County District Attorney Fran Chardo said the officers were part of a marshals service task force.

The shooting occurred at a home less than two miles from the state Capitol, in a working class neighborhood of duplexes, single-family homes and commercial buildings.

Police were keeping people well away from the scene as they investigated.

The shooting occurred near where police shot and killed an Egyptian immigrant on Dec. 22 after he wounded a state trooper and shot at another officer near the Capitol. That man is believed to have acted alone.