Gamma-ray polarimetry is a new powerful tool to study the processes responsible for the emission from astrophysical sources and the environments in which this emission takes place. Few successful polarimetric measurements have however been performed thus far in the gamma-ray energy band due to the difficulties involved. POLAR is a dedicated polarimeter designed to perform high precision measurements of the polarization of the emission from gamma-ray burst in the 50-500 keV energy range. This new polarimeter is expected to detect approximately 50 gamma-ray bursts per year while performing high precision polarization measurements on approximately 10 bursts per year. The instrument was launched into lower earth orbit as part of the second Chinese space lab, the Tiangong-2, on September 15th 2016 and has been taking data successfully since being switched on one week after. The instrument uses a segmented scintillator array consisting of 1600 plastic scintillator bars, read out by 25 flat-panel multi-anode photomultipliers, to measure the Compton scattering angles of incoming photons. The small segmentation and relatively large uniform effective area allow the instrument to measure the polarization of a large number of transient events, such as gamma-ray bursts, with an unprecedented precision during its two year life-time. The final flight model underwent detailed calibration prior to launch as well as intensive space qualification tests, a summary of which will be presented in this paper. The instrument design will be discussed first followed by an overview of the on-ground tests, finally the in-orbit behavior as measured during the first weeks of the mission will be presented.