A polarizable model for ammonia is optimized based on the ab initio properties of the NH3 molecule and the NH3-NH3 and NH3-H2O dimers calculated at the MP2 level. For larger (NH3)(m), NH3(H2O)(n), and H2O(NH3)(n), clusters (m = 2-7 and n = 1-4), the model yields structural and binding energies in good agreement with ab initio calculations without further adjustments. It also reproduces the structure, density, heat of vaporization, self-diffusion coefficient, heat capacity, and isothermal compressibility of liquid ammonia at the boiling point. The model is further validated by calculating some of these properties at various temperatures and pressures spanning the liquid and supercritical phases of the fluid (up to 700 K and 200 MPa). The excellent transferability of the model suggests that it can be used to investigate properties of fluid ammonia under conditions for which experiments are not easy to perform. For aqueous ammonia solutions, the model yields liquid structures and densities in good agreement with experimental data and allows the nonlinearity in the density-composition plot to be interpreted in terms of structural changes with composition. Finally, the model is used to investigate the solvation structure of ammonia in liquid water and of water in liquid ammonia and to calculate the solvation free energy of NH3 and H2O in aqueous ammonia as a function of solution composition and temperature. The simulation results suggest the presence of a transition around 50% molar NH3/H2O compositions, above which water molecules are preferably solvated by ammonia.