You don't need an invitation to visit the governor's palace, the king's castle or the cloistered convent. These, and about two dozen other unusual inns, are available to travelers in Portugal and are among the best bargains in Europe. They are government pousadas, a word that means "resting place."

The Portuguese Tourist Department has worked slowly and deliberately to preserve the integrity of existing structures -- modernizing and decorating with care and taste. More than just providing shelter, pousadas evoke Portugal's cultural heritage. Treasures from museums and palaces provide furnishings, sculpture, painting, tapestries, suits of armor and architectural odds and ends. It is like taking bed and board at the National Gallery.

The key to success has been the tasteful application of these arts and crafts. A pousada's reception desk may be of carved mahogany, a stairway molded tile, window and door frames sculptured stone; there may be Renaissance-style dining-room furniture and hand-woven cotton bedspreads.

Early pousadas were so popular that stays had to be limited to five days. While there no longer is a time restraint, the demand for pousada rooms is great and the government continues its building program.

In 1940 the government undertook its first inn, the Pousada do Castelo in O'bidos, 50 miles north of Lisbon. Fortified by the Moors in the 8th century, the town's walls are punctuated by round battlements and square towers. (In those days, O'bidos was a coastal town, but hundreds of years of silting action made it landlocked.)

On a visit in 1228, Queen Isabella was so enchanted with O'bidos that the king made her a gift of it. Monarchs repeated this gesture to their consorts until the last century.

Eight hundred years after the town was enclosed, a palace was built and connected to the original walls. This became the present-day inn. To get to it, you must first enter the town's main gate. It still has a zig-zag entrance that prevented enemy armies from mounting a direct attack. A modern traffic light advises cars when the other side is clear (only compacts can fit through).

Then you drive the length of the town on cobbled streets between white houses displaying geraniums and bougainvillea. At the pousada, which took 10 years to restore, you climb several sets of wide stone steps before passing through an arched gate to its topiary-filled courtyard.

There what first catches your eye are the twisted stone window columns. Done in 16th-century Manueline style (after King Manuel I), they are much ornamented with figures and foliage, although the decoration here is more restrained than in other examples of this indulgent period. The Manueline style thrived for only 30 years but added a distinctive flavor to the French- and Italian-influenced Portuguese Renaissance.

The stucco inn is in marked contrast to the rough stone walls against which it is built. It speaks of a different period, a different culture, a different style. Its north windows puncture the original wall to overlook the countryside. A restored bedroom suite is available in one of the 8th-century stone towers with access by parapeted catwalk from the main pousada.

While approaches and landscaping are different at each pousada, there is a unifying quality to the interiors. You always know you are in the hands of competent architects and decorators.

Inside the pousada at O'bidos, a stone staircase takes you to the beautifully furnished dining room. It has tiled wainscoting and carved wooden beams. If you sit on the south side of this stunning room, you will see the courtyard; on the north, you scan the expansive valley below. This may be the most perfect room for dining that I have seen.

The inn at O'bidos is one of few in Portugal that is part of a larger community within the walls, an evocative medieval presence. As such, it justifies a longer-than-usual stay. The town is a maze of curving narrow streets interrupted by plazas and churches, with teahouses and shops along the way. These shops display the folk arts of Portugal -- lace, straw baskets, carved woodwork, crocheted sweaters, hooked wall hangings and leather, ceramic, copper and wrought-iron objects. O'bidos is known for its cotton rugs, and they can be seen in progress.

The museum down the street from the inn is in an ancient five-story building that has been nicely modernized. Its art, however, is of the simple pious variety -- not the high quality of the pousada's work. The same is true of the paintings in St. Mary's Church on the main square. Much of this was done by the town's own Josefa of O'bidos, but it is of interest primarily to art historians specializing in the 17th century.

In this and other churches, see the wall and ceiling tile called azulejos. This is a Portuguese trademark. It was introduced by the Moors (who learned it from the Persians). The first azulejos were blue (azul), and the Portuguese use them to depict landscapes and historical scenes. You also find azulejos on the ceiling of the town's main entrance arch.

The main square in front of St. Mary's Church still has its pillory to which miscreants were chained. But don't worry -- these symbols of municipal power have not been used since the 18th century.

It is a good idea to venture outside the walls during your O'bidos stay. Drive through the greenery of the Portuguese countryside, where olive groves march down the hillsides and grapes and rice occupy the wet lowlands. See the eucalyptus groves and home gardens with ubiquitous Brussels sprouts.

Don't miss the meadows on which black fighting bulls are raised. (In Portugal the animals are not killed in the bullring, as in Spain.) See the four-sail windmills; more are turning in Portugal than in any other European country. And drive to the nearby fishing village of Peniche, where the Atlantic storms the shore so violently that breakwaters cannot be built. While there, visit the lace-making school. In Peniche, the saying is, "Where there are nets, there is lace."

And see a pattern of development that gives the lie to Portugal's reputation as the poor man of Europe. In an hour's drive, you will pass through dozens of clean, well-kept villages, each exhibiting the Latin propensity for blank walls toward the street, courtyards inside. These streets invariably converge on a plaza, where you find the best church the town can afford.

The Pousada at O'bidos is one of three within easy reach of Lisbon. To visit a second, take the Lisbon-Setu'bal highway a half-hour south of Lisbon to the city of Palmela.

Not a country town like O'bidos, Palmela is a booming place with large apartments, office buildings and hospitals. On a hill overlooking all this are 14th-century ramparts with battlements designed for defense by archers. A 15th-century convent within is now a pousada. Restored in 1979, the austerity of its cloistered courtyard was deliberately retained as the center of the inn. Around it are the bar, restaurant and breakfast nook.

While the inn at O'bidos is strong in decoration, the Pousada de Palmela is elegant in its restraint. The exuberant Manueline detail is nowhere to be seen. Instead there are tactile off-white walls with occasional touches of architectural remains -- a classic capital near the stairway, a Renaissance fountain in a downstairs wall.

This is a self-confident inn of symmetry and repose, the result of ample spaces (10-foot-wide glazed corridors), strong structural elements (vaulted ceilings) and resplendent construction materials (granite and limestone). It is more in the grand hotel vernacular. I suspect later pousadas like this exhibit fewer works of art because so much was put into the early ones.

This inn is part of a compound encompassing a fine church with Romanesque nave and Gothic chancel. The old stables near the castle keep are being made into shops, and a swimming pool has been installed in a corner of the original parade ground. Follow the winding stairs through arches into the ruins of a one-time mosque later used as the Church of St. Mary's and finally toppled in the earthquake of 1755 (the same one that leveled Lisbon).

Further south from Palmela on the banks of the Sado River estuary lies the port city of Setu'bal. Overlooking it is the Castle of San Felipe built in 1590 on orders of the ruling Spanish to control the angry citizens. The Pousada de San Felipe is inside the castle. From its terrace dotted with sculptured umbrellas, guests gaze down on orange groves and colorful sardine boats. You can cross a covered passage from the pousada to a chapel whose interior is completely covered with 18th-century azulejos depicting San Felipe's life.

This region produces a special muscatel wine and is the only source of Portuguese seed oysters.

Pousadas are quite evenly distributed throughout Portugal, but their facilities vary. If you want to fish, the best is Abrigo para Pescadores in an island castle (it is temporarily closed for restoration). Other fishing (and hunting) facilities include Pousada de Sao Gens, Pousada de Santa Clara, Pousada do Infante.

Horseback riding, tennis and swimming can be found at Pousada de Sao Bento. Swimming is also available at Pousada de Sao Jero'nimo, Pousada de Sao Laurenco, Pousada de Sao Tiago, Pousada de Santo Antonio, Pousada da Ria and Pousada de Palmela.

Pousada rooms are $30 a night for two; this includes a continental breakfast of juice, brioche, toast, jellies, cheese and coffee. A second meal, demi-pension, costs $15 more for two and is an elaborate multi-course presentation -- all the food you will want that day. Don't choose a la carte as the prices quickly exceed the dinner charge.

Most pousadas -- especially those in old structures -- have only a few rooms, between nine and 27, and from March to October they are overbooked. During that season it is necessary to make reservations several months in advance. It is also a good idea to deal directly with individual pousadas, since their hotel agent in the United States adds a high markup over published rates. While the Portuguese Tourist Office in New York does not make reservations, it will provide a pousada booklet that gives descriptions and addresses. The address is 548 Fifth Ave., New York, N.Y. 10036. The number is (212) 354-4403.