In this paper simultaneous localization and map building is performed with a hybrid, metric - topological, approach. A global topological map connects local metric maps, allowing a compact environment model, which does not require global metric consistency and permits both precision and robustness. However, the most important innovation of the approach is the way how loops in the environment are handled by map building using the information of the multi hypotheses topological localization. The method uses data from a 360° laser scanner to extract corners and openings for the topological approach and infinite lines for the metric method. This hybrid approach has been tested in a 50 x 25 m2 portion of the institute building with a fully autonomous robot. The performances of the whole system are proven empirically by comparing maps generated by independent explorations, testing the localization capabilities, making relocation experiments and showing how the technique for closing the loop works.