Aim To evaluate safety of using rivaroxaban in patients with stage 4 chronic kidney disease (CKD) or transient, stable decline of glomerular filtration rate (GFR) to 15-29 ml /min / 1.73 m2 in the presence of atrial fibrillation (AF).Material and methods This multicenter prospective, randomized study included patients admitted to cardiology departments from 2017 through 2019. Of 10 224 admitted patients 109 (3 %) patients with AF and stage 4 CKD or a stable decline of GFR to 15-29 ml /min / 1.73 m2 were randomized at 2:1 ratio to the rivaroxaban 15 mg /day (n=73) treatment group or to the warfarin treatment group (n=36). The primary endpoint was development of BARC and ISTH major, minor, and clinically relevant minor bleeding. Mean follow-up duration was 18 months.Results Patients receiving warfarin had a significantly higher incidence of BARC (n=26 (72.2 %) vs. n=31 (42.4 %), р<0.01) and ISTH (n=22 (61.1 %) vs. n=27 (36.9 %), p<0.01) minor bleeding and all ISTH clinically relevant (minor clinically relevant and major bleedings) n=10 (27.7 %) vs. n=8 (10.9 %), р=0.03]. The number of repeated hospitalizations was 65 (43% of patients) in the rivaroxaban treatment group and 27 (48% of patients) in the warfarin treatment group (р=0.57), including 24 (36.9 %) and 11 (40.7 %) emergency admissions in the rivaroxaban and warfarin treatment groups, respectively (р=0.96). Significant improvement of changes in creatinine clearance and GFR (by CKD-EPI and Cockroft-Gault) was observed in the rivaroxaban treatment group.Conclusion The study provided evidence for a more beneficial safety profile of rivaroxaban compared to warfarin in patients with AF and advanced CKD.