North and South Korea today signed an accord to field a joint team in two international sporting events, marking the first time in 45 years the rival nations will compete on the same side.

Teams with players from both nations will partcipate in the 41st World Table Tennis Championships in Japan in April and the Sixth World Youth Soccer Championship in Portugal in June, delegates to joint talks said today.The chief delegate from Communist North Korea, Kim Hyung Jin, said the agreement was a step toward unification of the divided Korean peninsula.

Kim smiled broadly and shook hands with South Korea's chief delegate, Chang Choong-shik, across a conference table at the border village of Panmunjom where talks were held.

South Korean officials expressed hope the accord would lead to further dialogue and the possible formation of a joint team for the 1992 Olympic Games in Barcelona, Spain. Newspapers in Seoul splashed the news across front pages.

The formal signing occurred late in the day at Panmunjom.

Today's accord was seen as indicative of the gradual thaw in relations on the Korean peninsula. South and North Korea have been rivals since the division of the peninsula in 1945, and remain technically at war. The border between them is tightly sealed and one of the most heavily fortified in the world.

The nations have held talks on easing tensions since the early 1970s, but have failed to make signficant progress. Past inter-Korea talks on forming a single team for international sports competitions have failed.

In October, however, the Communist North and capitalist South held inter-Korea soccer competitions for the first time in four decades.

Under today's agreement, leadership of the teams will be alternated. North Korea will name the leader of the table tennis team and South Korea will name the leader for the soccer team.

The accord calls for joint training for the table tennis team in Japan. Players will be selected by a joint panel through consultations instead of open competitions.

Members of the joint soccer team will be chosen by competition in two matches in both North and South Korea between late April and early May.

Delegates said today that 10-member joint panels to choose table tennis athletes will meet Feb. 21, and a panel to choose soccer players will meet Feb. 22. Both meetings will be in Panmunjom.