WASHINGTON — The Pentagon is ordering most of its approximately 400,000 furloughed civilian employees back to work.

In Maine, several thousand civilian defense employees and contractors have already been furloughed because of the shutdown.

Portsmouth Naval Shipyard in Kittery furloughed 1,500 of the facility’s roughly 4,600 employees earlier this week while 170 Navy employees who work at the privately owned Bath Iron Works shipyard were sent home without pay.

Additionally, about 400 federal technicians who work with the Maine Army and Air National Guard were furloughed. More than 40 employees at the Maine Department of Defense, Veterans and Emergency Management were also given temporary layoff notices on Thursday because their positions were funded by the Pentagon.

It was unclear Saturday afternoon how many of those civilian defense employees in Maine would be brought back with pay. In a statement, Defense Secretary Chuck Hagel said federal attorneys concluded that the “Pay Our Military Act” allows the Pentagon to eliminate furloughs for employees “whose responsibilities contribute to the morale, well-being, capabilities and readiness of service members.”

That measure was passed by Congress and signed by President Barack Obama shortly before the partial government shutdown began Tuesday.

Hagel said affected employees could be notified as early as this weekend if their status changes.

A spokeswoman said Saturday afternoon that the Navy was still working to identify who will no longer be furloughed.

“The Navy’s priority has been getting our civilian workforce back as quickly as possible. We are grateful that the majority of our civilians will now be returning to work,” Navy Lt. Commander Rebecca Rebarich said in an email. “There are details that still must be worked out and the Navy staff is working on that now. We will continue to keep everyone updated and apprised as additional information becomes available.”

Hagel had made clear earlier in the past week that Pentagon lawyers were trying to determine ways for some of the Defense Department’s 400,000 furloughed civilians to get back to work.

He told reporters traveling with him Tuesday in South Korea, “It does have an effect on our relationships around the world and it cuts straight to the obvious question: Can you rely on the United States as a reliable partner to fulfill its commitments to its allies?”

The Pentagon did not immediately say on Saturday exactly how many workers will return to work. The Defense Department said “most” were being brought back.

The law ensured that members of the military, who have remained at work throughout the shutdown, would be paid on time. It also left room for the Pentagon to keep on the job those civilians who provide support to the military.

Washington Bureau Chief Kevin Miller contributed to this story.