Salim met Javed Akhthar for first time during the making of the film "Sarhadi Lootera," which was to be Salim's last acting appearance. Javed, who served as a clapper boy when shooting began, was later made the dialogue writer for the film by director S.M. Sagar. Their friendship began while both were working in this film, and developed further because their bosses were neighbours to each other. Salim Khan got a job assisting writer/director Abrar Alvi in finalising screenplays and dialogues, while Javed Akhtar began assisting Kaifi Azmi in a similar capacity, with focus on honing poetry. Abrar Alvi and Kaifi Azmi were neighbours, and therefore Salim Khan and Javed Akhtar used to see a lot of each other. The duo hit it off well and formed a script-writing team that came to be known as Salim–Javed. Salim used to form stories and plots, whereas Javed used to develop the dialogues and occasionally the song-lyrics for those films. They used to brainstorm and come to conclusions regarding the final draft of the film.