An employee of the Internet company Facebook walks through the courtyard of the company campus in Menlo Park, California.

A Facebook worker based in one of its Seattle offices tested positive for the coronavirus, and the company is encouraging all 5,000 employees in the area to work from home the rest of the month.

"A contractor based in our Stadium East office has been diagnosed with COVID-19. We've notified our employees and are following the advice of public health officials to prioritize everyone's health and safety," a company spokesperson said Wednesday night.

Facebook is closing its Stadium East office until Monday, the end of the incubation period for the contractor, who was last in the office on Feb. 21.

The company is encouraging all Seattle-based employees to work from home until March 31, based on King County's updated guidance. Washington state has reported the largest number of coronavirus cases in the United States. Ten people in the state have died from the virus as of Wednesday night. Health officials have reported at least 39 confirmed cases, while 231 people remain under supervision.

Earlier this week, a Seattle-based employee of Amazon tested positive for COVID-19.

Amazon notified employees of the update in a memo, saying, "The employee went home feeling unwell on Tuesday, February 25 and has not entered Amazon offices since that time."

-CNBC's Ryan Ruggiero contributed to this report.