A method of ab initio crystal structure determination from powder diffraction data for organic and metal–organic compounds, which does not require prior indexing of the powder pattern, has been developed. Only a reasonable molecular geometry is required, needing knowledge of neither unit-cell parameters nor space group. The structures are solved from scratch by a global fit to the powder data using the new program FIDEL-GO (`FIt with DEviating Lattice parameters - Global Optimization'). FIDEL-GO uses a similarity measure based on cross-correlation functions, which allows the comparison of simulated and experimental powder data even if the unit-cell parameters deviate strongly. The optimization starts from large sets of random structures in various space groups. The unit-cell parameters, molecular position and orientation, and selected internal degrees of freedom are fitted simultaneously to the powder pattern. The optimization proceeds in an elaborate multi-step procedure with built-in clustering of duplicate structures and iterative adaptation of parameter ranges. The best structures are selected for an automatic Rietveld refinement. Finally, a user-controlled Rietveld refinement is performed. The procedure aims for the analysis of a wide range of `problematic' powder patterns, in particular powders of low crystallinity. The method can also be used for the clustering and screening of a large number of possible structure candidates and other application scenarios. Examples are presented for structure determination from unindexed powder data of the previously unknown structures of the nanocrystalline phases of 4,11-difluoro-, 2,9-dichloro- and 2,9-dichloro-6,13-dihydro-quinacridone, which were solved from powder patterns with 14–20 peaks only, and of the coordination polymer dichloro-bis(pyridine-N)copper(II).