Comparison of analgesic efficacy of ultrasound-guided transmuscular quadratus lumborum block (QL-3) and erector spinae block (ESP) in children undergoing open pyeloplasty was done in this study. This was a randomized, double-blinded, controlled study conducted in a tertiary care center, operating rooms, post-anesthesia care unit (PACU), and paediatric surgical ward. Sixty children of age 1-6 years, with American Society of Anesthesiologists (ASA) status I or II, undergoing elective open pyeloplasty were included in the study. Patients were randomized into two groups: group I (QL block-3) and group II (ESP). Both blocks were performed under USG guidance using 0.5 ml/kg of 0.25% ropivacaine after induction of general anesthesia. Postoperative Modified Objective Pain Score (MOPS), perioperative hemodynamic parameters, perioperative time for first rescue analgesia, total rescue analgesia, and incidence of complications were recorded. Statistical tests were applied as follows: (i) quantitative variables were compared using independent t-test/Mann-Whitney test (when the data sets were not normally distributed) between the two groups, and repeated measure analysis of variance (ANOVA)/Friedman test was used for comparison between different time intervals within the same group and (ii) qualitative variables were correlated using the Chi-square test/Fisher's exact test. A P value of <0.05 was considered statistically significant. Pain was assessed using MOPS in the postoperative period at 0, 30 min, 1, 2, 4, 6, 12, and 24 h. Overall, the pain scores were low and showed a decreasing trend toward baseline as time progressed. Group I showed lower score, but was statistically significant only at the sixth hour. Highest mean score was 2.4 ± 2.01 in group I and 2.67 ± 2.32 in group II. Perioperative hemodynamic parameters were comparable. Total rescue analgesia during the perioperative period was not statistically significant (intraoperative P = 0.075 and postoperative P = 0.928). Also, 63.33% patients in group I and 63% patients in group II required rescue analgesia in the postoperative period and were comparable. Mean ± standard deviation (SD) for first rescue analgesia time was 6.32 ± 12.57 in group I and 16.67 ± 31.25 in group II, but not significant. The distribution in group II was skewed, hence the larger value for group II, but when compared to group I, this was statistically not significant. Both ultrasound-guided ESP block and QL block using 0.25% ropivacaine 0.5 ml/kg provided adequate analgesia during the first 24 h post-surgery in children undergoing open pyeloplasty. The fentanyl requirement during the first 24-h postoperative period was also decreased.