Hainan Airlines and state officials, including Gov. Deval Patrick, made the announcement at the Massachusetts Statehouse on Wednesday.

The airline will offer four nonstop flights a week in each direction between Boston and Beijing on the Boeing 787 Dreamliner, with connections offered to other cities in China, including Shanghai.

It will be the first direct service ever from Boston to mainland China, shaving about six hours off of current travel between Boston and Beijing.

"Getting nonstop service to China has been a long-sought goal for Massachusetts," said Thomas Glynn, chief executive of the Massachusetts Port Authority, the agency that operates Boston's Logan International Airport.

Estimated flight time between the two cities will be about 13 hours and 20 minutes, according to Hainan Airlines.

U.S. citizens are allowed to remain in Beijing for up to 72 hours without a visa if they are traveling to other international points, under recent changes in visa regulations.

Boston was the largest U.S. airline passenger market without nonstop service to China, officials said.

"These flights provide a direct connection to the world's second-largest economy and our state's fourth-largest foreign market, and will make it much easier for businesses and tourists to travel between the two regions," said Paul Guzzi, president of the Greater Boston Chamber of Commerce.

A maid who cleaned the home of former New England Patriots player Aaron Hernandez has testified at his murder trial that she saw him "messing with" the security camera in his basement the day after the killing.