Ammonia (NH 3) is one of the most widely produced chemicals worldwide. It has application in the production of many important chemicals, particularly fertilizers. It is also, potentially, an important energy storage intermediate and clean energy carrier. Ammonia production, however, mostly uses fossil fuels and currently accounts for more than 1.6% of global CO2 emissions (0.57Gt in 2015). Here we describe a solar-driven nanostructured photoelectrochemical cell based on plasmon-enhanced black silicon for the conversion of atmospheric N2 to ammonia producing yields of 13.3 mg m-2 h-1 under 2 suns illumination. The yield increases with pressure; the highest observed in this work was 60 mg m-2 h-1 at 7 atm. In the presence of sulfite as a reactant, the process also offers a direct solar energy route to ammonium sulfate, a fertilizer of economic importance. Although the yields are currently not sufficient for practical application, there is much scope for improvement in the active materials in this cell.