We performed an extensive first-principles study of nanowires in various pentagonal structures by using pseudopotential plane wave method within the density functional theory. Our results show that nanowires of different types of elements, such as alkali, simple, transition and noble metals and inert gas atoms, have a stable structure made from staggered pentagons with a linear chain perpendicular to the planes of the pentagons and passing through their centers. This structure exhibits bond angles close to those in the icosahedral structure. However, silicon is found to be energetically more favorable in the eclipsed pentagonal structure. These quasi one dimensional pentagonal nanowires have higher cohesive energies than many other one dimensional structures and hence may be realized experimentally. The effect of magnetic state are examined by spin-polarized calculations. The origin of the stability are discussed by examining optimized structural parameters, charge density and electronic band structure, and by using analysis based on the empirical LennardJones type interaction. Electronic band structure of pentagonal wires of different elements are discussed and their effects on quantum ballistic conductance are mentioned. It is found that the pentagonal wire of silicon exhibits metallic band structure.