The import bill was 491 billion dirhams while exports stood at 282 billion dirhams.
Energy imports decreased 7.2%, representing 15.6% of all imports, thanks to lower prices in international market and fewer gasoline imports.
The automotive sector, notably wiring segment, saw its exports rise 6.6% to 77 billion dirhams while agriculture and food sales increased 4.1% to 60.8 billion dirhams.
The aeronautical industry sold 15.8 billion dirhams worth of exports, up 7.3% from a year earlier.
Textile and leather exports dropped 2.3% amid talks with Turkey to review a free trade agreement which Moroccan textile manufacturers blame for their losses.
Exports of phosphates and derivatives also shrunk 5.9% mainly due to a drop in phosphates and fertilizers sales.
The flow of foreign direct investments almost dropped by half at 46.8% to 18.8 billion dirhams. Remittances from the Moroccan community abroad was stable at 64.8 billion dirhams.