When we interact with one another, we tend to align our behaviors, including the way we talk. Psycholinguistic work has conceptualized alignment as the result of automatic cognitive mechanisms that operate to facilitate processing and communication. Sociolinguistic work has focused on the role of social identity and interactional strategy in explaining linguistic alignment. We draw on these two largely distinct traditions to investigate socially mediated syntactic alignment with the goal of understanding how social perception and cognition influence the mechanisms involved in alignment. A novel web-based paradigm was employed to collect speech data from a large socially heterogeneous sample. Participants listened to one of three speakers, each with a different accent, deliver an ideologically charged diatribe. Participants then completed a picture description task to assess the degree of syntactic alignment. Finally, participants completed a comprehensive social questionnaire designed to assess a wide range of social dimensions, which were tested as predictors of alignment. Our results suggest that syntactic alignment is to some extent automatic, but socially mediated. We found an overall alignment effect across social conditions and independent of social perceptions. However, the degree of alignment was influenced by a number of factors, including the perceived standardness of the passage speaker's accent, participants' perceived similarity to the speaker, and participants' preference for compromise as a conflict management style. These findings are discussed in terms of theories of linguistic alignment and speech production.