It was at a beautiful old youth hostel in Venice where the trouble started. A friend from Algeria and I left to explore the Piazza San Marco, where pigeons wheeled over the palatial square that served as the town's cultural hub. Just before going out the door, Osmone tossed his backpack into a towering mound of knapsacks and sleeping bags left by hostel guests while they explored the city. "It's good to get rid of that monster for a while," he declared.

When we got back, Osmone's backpack was gone. And his passport and wallet had left with it.

Related: 5 Ways to Safeguard Your Luggage

"No, no, no, impossible!" Osmone wailed. Directed to a tiny police station nearby, we fidgeted as a bored officer used two fingers to slowly type up a theft report, complicated by the fact that he spoke only Italian and my friend only French. When Osmone finally pantomimed the robbery, the policeman nodded sagely. Then he shrugged, palms out, and rolled his eyes upward, perhaps asking why he was cursed with tourists so stupidi as to leave all their belongings in public.

With no ID, passport or money, Osmone had to leave the country immediately — although with only a few lira in his pocket, he wasn't sure how. Still in a daze of disbelief about the theft, he murmured again, "Everyone left their things there...It safe."

Hostels are among the most gratifying places a traveler of any age could ever stay, filled with adventuresome souls from all over the world. But it's good to take a few precautions so you'll have only great memories, and your belongings, to take home.

Hostels: The good, the bad and the ugly

The exciting part of hostel life is also its downside. Unless you are able to secure a private room, you'll be sleeping in a dormitory with bunk beds filled with strangers and dining in a hall with still more.

Some may later become people who travel the country with you, or even become lifelong friends. But among the many gracious, open-hearted travelers you'll run into, a handful of others are more interested in your wallet.

Related: Preparing Your College Student for Travel Abroad

Here are a few tips to stay safe in hostels while having the time of your life.

Keep valuables under your clothing. My friend learned this the hard way: Keep your passport, driver's license, keys and credit or debit cards, along with any big bills, in a zipped bag on a necklace or in an inside pocket of your clothing, even at night. Ignore hostel guidebooks that say to sleep with valuables under your pillow. I can still remember the shrieks from a woman in our hostel dorm in Rome as she discovered the valuables under her pillow had been pilfered while she slept.

Chose a central area hostel with security. In a big city, look online or in a guidebook for a hostel with 24-hour reception, a security guard or lockers for your backpack. Are the lockers sides, top and bottom secure? If so, give the door a tug after you lock it. If it pops open, you need a new locker. Online reviews will give you a good feel for the hostel, and even rates hostels on safety.

Co-ed or single sex? Co-ed rooms can be fun, but some women may want to request a women-only dorm. One friend traveling in Europe recalls that in her hostel's co-ed dorm, two young men decided to climb in bed with sleeping women. Foiled by the women and their enraged dorm-mates, the men were booted out of the hostel (and today would be arrested as well). Such incidents, however, appear to be extremely rare.

Pack a lock, sleep sheet and sundries. Unlike hotels, hostels don't always offer linens, soap, towels or shampoo, so be sure to carry your own, as well as a lock for your locker and a pair of flip-flops for the shower. Bring a few books in your native tongue, too; they’ll help you past bouts of homesickness and are great for barter.

Related: 8 Travel Tips for Seniors

Trust your gut. If you run across someone you have a strange feeling about, avoid them. Some professional thieves infiltrate hostels and try to befriend travelers, waiting to relieve them of their valuables if they get careless.

Copy your irreplaceable documents. Make two copies of your passport, driver's license, and so on. Leave one copy at home with your family or a friend and take another copy with you, keeping it separate from the actual ID, of course. If everything is stolen, you can have your family fax you copies of the documents. It's a lot easier to prove that you're you, as my friend Osmone had to do after losing all his ID.

As it turned out, the Algerian Embassy came to Osmone's rescue and shipped him home COD. He left clutching a paper bag that I'd stuffed with sandwiches, a canteen and dollar bills, since the Embassy's generosity stopped short of provisions for the days-long journey. My last memory of him in Venice is him waving sadly from a boat as it got smaller and smaller and finally disappeared over the horizon.

Months later, back home, I received a surprise package from Algeria. It contained a letter from Osmone and an exquisitely carved Algerian leather purse that smelled like cinnamon. Inside it was a piece of paper with a smiley face and a short note: Don't leave this in a hostel.

Diana is an award-winning writer and editor with more than 20 years' experience in magazine, video, book and digital journalism, with a specialty in health coverage. She was a longtime writer and news editor at the Center for Investigative Reporting; has written for publications from the Washington Post to the Times of London syndicate; and has served as a senior and/or consulting editor at Time Inc. Health, Hippocrates, HealthDay News Service and Reporting on Health. She was also editor in chief of Consumer Health Interactive, a national health and medical web site, and has reported on finance for Blueshift Research and PBS Frontline. Before joining SafeBee, she was editor of Bioenergy Connection, a national magazine about bioenergy at UC Berkeley. Her favorite safety tip: Wear a bike helmet.