Trade ministers from 12 Pacific Rim nations negotiating the Trans-Pacific Partnership agreement pose for a group photo at a meeting in Lahaina, Hawaii on Thursday. (Audrey Mcavoy/AP)

High-level talks to forge a ­12-nation trade deal spanning the Pacific broke up Friday without resolving contentious disputes over Canadian dairy tariffs, the protection of cutting-edge drugs known as “biologics” and Japanese access to the North American automobile market.

Negotiators said they would continue to seek agreement over the coming months, but the failure to wrap up the accord, known as the Trans-Pacific Partnership, was a setback for President Obama, who hopes that the completion of a deal will be one of his signature achievements.

Further talks could still produce an accord before the end of the year, but earlier, U.S. officials had been hopeful that the four days of negotiations, which took place this week in beachside hotels on the Hawaiian island of Maui, could produce a final agreement.

U.S. Trade Representative Michael Froman said the negotiators would “continue intensive engagement to find common ground” and that he was “more confident than ever that TPP is within reach and will support jobs and economic growth.” Several other trade negotiators expressed optimism in the group’s closing news conference.

Substantial progress was made in certain areas, including the completion of a chapter about environmental protection. Negotiators also made progress on whether geographic places can be trademarks for such items as cheeses.

But the trade ministers could not work out other issues, despite lengthy sessions. The top trade ministers themselves met until well past midnight Thursday but still could not bridge differences over intellectual property and how many years of protection to provide data belonging to the makers of biologic drugs from natural chemicals.

Those companies have 12 years’ protection in the United States under the Affordable Care Act, but some TPP countries offer as little as three years’ protection.

When completed, the Trans-Pacific Partnership would be composed of more than 100,000 tariff lines, cover economies with 40 percent of the world’s gross domestic product, and include more than 20 different chapters addressing issues such as labor conditions, wildlife trafficking, human rights and, of course, trade.

The secret negotiations have drawn sharp criticism from unions, human rights groups and the overwhelming majority of congressional Democrats. Obama barely scraped together enough support in June to secure negotiating authority from Congress in a close vote on Trade Promotion Authority commonly known as fast-track.

The delay in wrapping up the terms of the accord makes it more likely that a final agreement would not go to Congress for approval until 2016, when political considerations will be even more in the forefront of lawmakers’ minds. But U.S. officials said any setback would be temporary and that the trade accord, which has been under negotiation for six years, was still within reach. And they have observed that political concerns were already front and center in Congress as well as the presidential campaign.

“The calendar is never your friend,” Susan C. Schwab, President George W. Bush’s trade negotiator, said earlier in the week. “When you have 12 countries, somebody’s always going to have an election.”

One of the week’s toughest issues was how much to cut dairy tariffs in Canada. Canada, the United States’ largest trading partner, is holding elections in October, and the conservative prime minister, Stephen Harper, is reluctant to rouse the ire of dairy farmers who benefit from tariffs of up to 296 percent. U.S.-Canada ties have already been strained over the Obama administration’s failure to approve the Keystone XL pipeline, which would carry tar sands oil from northern Alberta to refineries on the Texas gulf coast.

Canada did offer to reduce the tariffs, but other countries thought the offer wasn’t adequate. New Zealand, in particular, is eager to gain access to the Canadian dairy market and was not satisfied with the proposal.

In a news conference after the meetings, New Zealand’s trade minister, Tim Groser, said that “dairy is always the last issue to be resolved or one of the last two issues to be resolved, because it’s been distorted for so many years.” He said that a lot of “the undergrowth has been cleared away” during the week and that they would find “the sweet spot” through further talks.

In other areas, Japan appeared likely to gradually reduce tariffs on pork and beef but was more reluctant to give access to foreign rice growers.

The United States sought to write in a clause that would help establish safeguards so that frivolous lawsuits could not be brought under the investor-state dispute settlement process that was widely criticized by liberal Democrats. The critics said it allows companies to use international arbitration to undercut national regulations.

Japan was also seeking more concessions on what is known as “rules of origin” that determine what national source of auto parts that are made with components from different countries. Japanese automakers want to use components made in non-TPP countries such as Thailand.

The country most notably absent from the talks has been China, the second-largest trading partner with the United States and the biggest trading partner with most of the Asian countries that are part of the accord. Obama has pointedly said that he favors the TPP because he does not want China to be setting lower standards.

“If we are not there helping to shape the rules of the road, then U.S. businesses and U.S. workers are going to be cut out, because there’s a pretty big country there, called China, that is growing fast, has great gravitational pull and often operates with different sets of rules,” Obama said in an interview in June with public radio show “Marketplace.”

Obama said that China had expressed interest in joining the TPP later, but he said that by that time TPP would have set standards and “then China is going to have to at least take those international norms into account.” He said the TPP accord would result in “leveling up, as opposed to a race to the bottom.”

In addition to negotiators, corporate lobbyists and others have been in Maui hoping to corner people involved in the talks. One was Rep. Sander M. Levin (D-Mich.), who earlier said that he was also concerned about currency ma­nipu­la­tion that could artificially boost a country’s exports; the possibility of long protection times for certain drugs and limits in access that could result; and whether goods from non-TPP countries, such as China, could be incorporated into products made by member countries and turn those non-TPP countries into free riders.

Levin said he also wanted the TPP to explicitly reserve the right of member countries to regulate tobacco products.

In a statement after the news conference, Levin said that “it is wise that the administration did not decide to get a deal done in the Trans-Pacific Partnership negotiations this week, as many key issues remain outstanding while others remain on the wrong track.”

He added that lawmakers “will also need to closely review the still-classified text to assess the extent to which there has been real and sufficient progress on issues such as the environment and investor-state dispute settlement.”