Canada imposed a ban on U.S. fishing in Canadian territorial waters yesterday and the United States promptly retaliated by closing its waters to Canadian fishermen.

The reciprocal bans, which go into effect on noon Sunday, include both Atlantic and Pacific waters.

Both sides said their decisions were made with great reluctance and both expressed the hope of reaching a long-term bilateral agreement that would provide for the resumption of the reciprocal fishing arrangements.

The tit-for-tat dispute reflects the absence of clearly defined sea boundaries between the two countries. This problem was compounded by the extension of offshore economic zones from 12 to 200 miles by both countries two years ago, creating complex and conflicting claims off both the Atlantic and Pacific coasts.

A State Department statement, expressing regret at Canada's decision, said the United States was left "with no option" but to retaliate in kind. American officials pointed out that the Canadians have failed to implement an interim U.S.-Canadian agreement by refusing to close the Swifture Bank area off British Columbia coast for conservation purposes, as requested by the United States.

External Affairs Minister Don Jamieson, in announcing the Canadian ban, said the action "is the most appropriate means of maintaining a balance between the fishing interests of the two countries."

But the two sides have agreed to resume negotiations June 19 on a long-term agreement. The talks will be conducted by Ambassador Marcel Cadieux of Canada and by Washington lawyer Lloyd Cutler, who has been appointed as the American negotiator.

The two countries have been conducting negotiations to determine sea boundaries in four areas. One, on the Atlantic coast, involves a body of water between the coast of Maine and Massachusets on one hand and Nova Scotia on the other. The three disputed Pacific regions involved the coasts of Washington State, Alaska and British Columbia.

Because the complexities involved in reaching a long-term agreement, Washington and Ottawa concluded interim agreements in 1977 and 1978. These allowed fishermen of both countries to fish for redfish, cod and haddock in both Canadian and American zones of the Atlantic and for tuna, groundfish and salmon in the Pacific.

The bilateral talks were suspended last February at Canada's request, presumably because of the expectation of federal elections in Canada.

The breakdown of the interim agreement was precipitated by what Canadians see as excessive U.S. catch levels in the Gulf of Maine-Georges Bank area and by Canada's unwillingness to close off the Swifture Bank area on the west coast fron April 15 to June 15 for conservation purposes. The latter led the United States to restric access of Canadian fishermen to waters off Washington State.

Both Ottawa and Washington have acted under political pressures from their respective regional fishing interests.

Although yesterday's reciprocal bans injected a jarring note in otherwise friendly bilateral relations, both sides have taken steps to avoid the risk of possible confrontation. Coast Guard vessels of both countries have been instructed to inform fishermen of the ban and instruct them to leave the disputed area before noon Sunday.

Jamieson told the House of Commons that Canada will "use common sense in enforcement (of the ban) and there won't be an escalation in the fishing effort in the dispute area."

The two sides are trying to make an arrangement for U.S. patrol boats to police American fishermen and Canadian vessels to ensure that the Canadian fishermen do not violate the U.S. territorial waters.

"I am confident that we can work out, on a cooperative basis, enforcement arrangements in the boundary regions that can avoid confrontation," Jamieson said.

U.S. officials said almost 60 American fishing boats were believed to be in Canadian waters yesterday.