People with factor XI deficiency have lower rates of ischaemic stroke than the general population and infrequent spontaneous bleeding, suggesting that factor XI has a more important role in thrombosis than in haemostasis. Milvexian, an oral small-molecule inhibitor of activated factor XI, added to standard antiplatelet therapy, might reduce the risk of non-cardioembolic ischaemic stroke without increasing the risk of bleeding. We aimed to estimate the dose-response of milvexian for recurrent ischaemic cerebral events and major bleeding in patients with recent ischaemic stroke or transient ischaemic attack (TIA). AXIOMATIC-SSP was a phase 2, randomised, double-blind, placebo-controlled, dose-finding trial done at 367 hospitals in 27 countries. Eligible participants aged 40 years or older, with acute (<48 h) ischaemic stroke or high-risk TIA, were randomly assigned by a web-based interactive response system in a 1:1:1:1:1:2 ratio to receive one of five doses of milvexian (25 mg once daily, 25 mg twice daily, 50 mg twice daily, 100 mg twice daily, or 200 mg twice daily) or matching placebo twice daily for 90 days. All participants received clopidogrel 75 mg daily for the first 21 days and aspirin 100 mg daily for the first 90 days. Investigators, site staff, and participants were masked to treatment assignment. The primary efficacy endpoint was the composite of ischaemic stroke or incident covert brain infarct on MRI at 90 days, assessed in all participants allocated to treatment who completed a follow-up MRI brain scan, and the primary analysis assessed the dose-response relationship with Multiple Comparison Procedure-Modelling (MCP-MOD). The main safety outcome was major bleeding at 90 days, assessed in all participants who received at least one dose of the study drug. This trial is registered with ClinicalTrials.gov (NCT03766581) and the EU Clinical Trials Register (2017-005029-19). Between Jan 27, 2019, and Dec 24, 2021, 2366 participants were randomly allocated to placebo (n=691); milvexian 25 mg once daily (n=328); or twice-daily doses of milvexian 25 mg (n=318), 50 mg (n=328), 100 mg (n=310), or 200 mg (n=351). The median age of participants was 71 (IQR 62-77) years and 859 (36%) were female. At 90 days, the estimates of the percentage of participants with either symptomatic ischaemic stroke or covert brain infarcts were 16·8 (90·2% CI 14·5-19·1) for placebo, 16·7 (14·8-18·6) for 25 mg milvexian once daily, 16·6 (14·8-18·3) for 25 mg twice daily, 15·6 (13·9-17·5) for 50 mg twice daily, 15·4 (13·4-17·6) for 100 mg twice daily, and 15·3 (12·8-19·7) for 200 mg twice daily. No significant dose-response was observed among the five milvexian doses for the primary composite efficacy outcome. Model-based estimates of the relative risk with milvexian compared with placebo were 0·99 (90·2% CI 0·91-1·05) for 25 mg once daily, 0·99 (0·87-1·11) for 25 mg twice daily, 0·93 (0·78-1·11) for 50 mg twice daily, 0·92 (0·75-1·13) for 100 mg twice daily, and 0·91 (0·72-1·26) for 200 mg twice daily. No apparent dose-response was observed for major bleeding (four [1%] of 682 participants with placebo, two [1%] of 325 with milvexian 25 mg once daily, two [1%] of 313 with 25 mg twice daily, five [2%] of 325 with 50 mg twice daily, five [2%] of 306 with 100 mg twice daily, and five [1%] of 344 with 200 mg twice daily). Five treatment-emergent deaths occurred, four of which were considered unrelated to the study drug by the investigator. Factor XIa inhibition with milvexian, added to dual antiplatelet therapy, did not substantially reduce the composite outcome of symptomatic ischaemic stroke or covert brain infarction and did not meaningfully increase the risk of major bleeding. Findings from our study have informed the design of a phase 3 trial of milvexian for the prevention of ischaemic stroke in patients with acute ischaemic stroke or TIA. Bristol Myers Squibb and Janssen Research & Development.