The film was to star Diljit Dosanjh initially, though he opted out of the project subsequently and was replaced by Emraan Hashmi. Later in June 2016, actors Vidyut Jammwal, Ileana D'Cruz and Esha Gupta were officially confirmed to be in the cast. Priyanshu Chatterjee was cast in a special appearance for the role of the politician Sanjeev, modelled after Sanjay Gandhi. In August 2016, Sunny Leone was signed in for a special appearance in a song. Principal photography commenced on 15 August 2016 in Mumbai. The second schedule started on 1 December 2016 in Jodhpur, Rajasthan. The third schedule commenced on 19 January 2017. Ileana D'Cruz wrapped her part of filming on 5 March 2017. The Rajasthan schedule was wrapped up on 9 March 2017. The makers of the film earlier announced that the films worldwide release would be on 26 January 2017. However, upon request from producers Ritesh Sidhwani and Rakesh Roshan of the films "Raees" and "Kaabil" respectively, Bhushan Kumar moved the worldwide release date to 12 May 2017. In early December 2016, Devgn announced 1 September 2017 as the worldwide release date. The soundtrack was released on 19 August 2017 by T-Series, which consists of eight songs, composed by Tanishk Bagchi, Ankit Tiwari, Abhijit Vaghani, DJ Chetas and Traditional Folk. The songs "Mere Rashke Qamar" and "Socha Hai" ("Kehdoon Tumhe" from the 1975 film "Deewaar") are recreations for the film by lyricist Manoj Muntashir and composer Tanishk Bagchi. Their originals were written by Fana Buland Shehri and Sahir Ludhianvi, and were composed by Nusrat Fateh Ali Khan and R. D. Burman respectively.