A Spanish pilot and two unarmed Swiss policemen seized Luciano Porcari here today, ending a long-distance hijacking that the 36-year-old Italian auto mechanic had reportedly planned as the last chapter of a book on his adventures.

A few moments later, 20 exhausted hostages left the Iberian Airlines 727 they had boarded nearly two days earlier for a 35-minute flight to Mallorca, ending the nightmarish odyssey in which they had touched ground twice in Africa and five times in Europe. The plane never landed in Majorca, its official destination, or in Moscow, where Porcari had planned to take it.

One of the policemen suffered a flesh wound in the thigh during the struggle to subdue the hijacker, but there were no other injuries.

Along the way, Porcari distributed nearly $50,000 among his hostages and quieted cranky children, drank part of a rase of champagne he had demanded and popped pills to stay alert, collected one of his daughters but failed to see or talk to another, and tried to justify his actions to his mother, whom authorities had called to talk to him by radio.

"Listen, Mama, remain clam, please," he said in a transcript released by airport authorities in Turin Italy. "You knew that one day I would be forced to a decision like this . . . after the Italian authorities have done nothing" to help reunited him with his daughters.

Referring to his three-year-old daughter, who his ex-mistress had handed over in the Ivory Coast, he said: I didn't want to leave her with the African as they treat children, like in Italy, like dogs."

Porcari's ex-wife refused, however, to bring their six-year-old daughter to the airport unless he left the airplane without harming anyone. Porcari chose to fly ot Moscow, instead, telling Turin airport authorities that he did not trust Italian police but, as a Communist, would turn himself in to the first Russian he met in Moscow.

Afterwards, his mother said no one had really been in danger: "He was an honest boy and would never have hurt anyone because he has a good heart," she said. "He wanted a family of his won like everyone else, and he had a right to."

This coincided with passengers' descriptions of Porcari during the flight - autographing 500-franc notes from the ransom, comforting children, sharing his champagne - but apparently he was a different person when the plane was on the ground.

Today, the Turin newspaper La Stampa published excerpts of an 80-page manuscript it said Porcari had given Ugo Moretti, one of its reporters, in Rome last year. It described his adventures in Somalia, Tanzania, Zambia, Malawi, Mozambique, Portugal, Spain, Canada, the Ivory Coast, Liberia, Guinea, Algeria and Italy.

Moretti said that Porcari had asked him six months ago for help in writing a book of his life, and had called collect from Barcelona Monday to ask how the book was coming.

"It is all here, but it lacks the final chapter," Moretti quoted himself as saying.

"You'll read the final chapter in the newspapers tomorrow morning," he said Porcari replied. "If we don't see each other again, take care of the book."

Today Swiss officials said Porcari would be tried here, unless Spain or Italy claims jurisdiction.

During the officials' press conference a woman passenger brought the hijacker's three-year-old daughter, wearing a brown dress and her hair in pig tails, into the room. She burst into tears when photographers with flash cameras surrounded her.