Inclusion Criteria:  ≥18 years of age at time of inclusion. Male and female patients with symptomatic PAH with a mean pulmonary artery pressure (mPAP) >20 mmHg and pulmonary vascular resistance (PVR) ≥2 Wood Units (WU), pulmonary arterial wedge pressure (PAWP) ≤15 mmHg (Group I / Nice Clinical Classification of Pulmonary Hypertension) or CTEPH (Group IV / Nice Clinical Classification of Pulmonary Hypertension) defined as inoperable measured at least 3 months after start of full anticoagulation and mPAP >20 mmHg and PVR ≥2 WU, PAWP ≤15 mmHg; or with persisting or recurrent PH after pulmonary endarterectomy (mPAP >20 mmHg and PVR ≥2 WU, PAWP ≤15 mmHg measured at least 6 months after surgery (acc. to Simonneau et al. 2018). Treatment naïve patients (with respect to PAH specific medication) and patients pre-treated with an endothelin receptor antagonist or a prostacyclin analogue, pre-treated for 2 months before screening at most (according to upfront combination treatment).* *Pre-treated patients need to be stable on endothelin receptor antagonists or prostacyclin treatment for at least two weeks prior to Visit 1. "Stable" is defined as no change in the type of endothelin receptor antagonists or prostacyclin analogue and the respective daily dose. A patient may also be enrolled, if a persisting phosphodiesterase type 5 (PDE-5) inhibitor treatment (pre-treated for 2 months before screening at most) with or without combination treatment with an endothelin receptor antagonist or prostacyclin analogue is to be switched to riociguat by clinical indication, particularly when the patient´s risk-profile remained in intermediate risk group despite adequate initial treatment including PDE5i (defined as at least 3 of the following parameters: clinical signs of progression, persistent WHO-FC III, 6MWD between 165-440m, peak V02 11-15ml/min/kg (35-65% predicted), NTproBNP 300-1400 ng/l, RA-area 18-26cm2,RAP 8-14mmHg, CI 2,0-2,4 l/min) or in case of PDE5i intolerance. Any decision to switch will be made by the clinicians at a regular clinical follow-up visit. Unspecific treatments which may also be used for the treatment of PH such as oral anticoagulants, diuretics, digitalis, calcium channel blockers or oxygen supplementation are permitted. However, treatment with anticoagulants (if indicated) must have been started at least 1 month before visit in patients with PAH 1. RHC results must not be older than 6 months at screening (will be considered as baseline values) and must have been measured in the participating centre under standardized conditions (refer to the study specific Swan Ganz catheterization manual). If the respective measurements have not been performed in context with the patient's regular diagnostic workup, they have to be performed as a part of the study during the pre-study phase (after the patient signed the informed consent). Women without childbearing potential defined as postmenopausal women aged 50 years or older, women with bilateral tubal ligation, women with bilateral ovariectomy, and women with hysterectomy can be included in the study. Women of childbearing potential can only be included in the study if all of the following applies (listed below): a. Negative serum pregnancy test at Screening and a negative urine pregnancy test at study start (visit 1). b. Agreement to undertake monthly urine pregnancy tests during the study and up to at least 30 days after study treatment discontinuation. These tests should be performed by the patient at home. c. Agreement to follow the contraception scheme as specified from Screening until at least 30 days after study treatment discontinuation. Patients who are able to understand and follow instructions and who are able to participate in the study for the entire period. Patients must have given their written informed consent to participate in the study after having received adequate previous information and prior to any study-specific procedures.  Exclusion Criteria:  Pregnant women, or breast-feeding women, or women of childbearing potential not able or willing to comply with study-mandated contraception methods specified above. Patients with PH specific treatment <2 months before screening. Patients with a medical disorder, condition, or history of such that would impair the patient's ability to participate or complete this study in the opinion of the investigator. Patients with underlying medical disorders with an anticipated life expectancy below 2 years (e.g. active cancer disease with localized and/or metastasized tumour mass). Patients with a history of severe or multiple drug allergies Patients with hypersensitivity to the investigational drug or any of the excipients. Patients unable to perform a valid 6MWD test (e.g. orthopaedic disease, peripheral artery occlusive disease, which affects the patient´s ability to walk).  The following specific medications for concomitant treatment of PH or medications which may exert a pharmacodynamic interaction with the study drug are not allowed:  Parenteral prostacyclin analogues Specific phosphodiesterase inhibitors (e.g. sildenafil or tadalafil): may be switched to riociguat but not be given in addition to the study drug or unspecific phosphodiesterase inhibitors (e.g. dipyridamole, theophylline) NO donors (e.g. Nitrates)  Pulmonary diseases exclusions  Moderate to severe bronchial asthma or COPD (Forced Expiratory Volume <60% predicted) or severe restrictive lung disease (Total Lung Capacity < 70% predicted) and/or defined as if high resolution computed tomography shows <20% parenchymal lung disease. Severe congenital abnormalities of the lungs, thorax, and diaphragm. Clinical or radiological evidence of Pulmonary-Veno-Occlusive Disease (PVOD) or Pulmonary Capillary Haemangiomatosis (PCH) or PH and idiopathic interstitial pneumonia (PH-IIP)  Cardiovascular exclusions:  Uncontrolled arterial hypertension (systolic blood pressure >180 mmHg and /or diastolic blood pressure >110 mmHg). Systolic blood pressure <95 mmHg. Left heart failure with an ejection fraction less than 40%. Pulmonary venous hypertension with pulmonary arterial wedge pressure >15 mmHg. Hypertrophic obstructive cardiomyopathy. Severe proven or suspected coronary artery disease according to investigators opinion (patients with Canadian Cardiovascular Society Angina Classification class 2-4, and/or requiring nitrates, and/or myocardial infarction within the last 3 months before Visit 1). Clinical evidence of symptomatic atherosclerotic disease (e.g. peripheral artery disease with reduced walking distance, history of stroke with persistent neurological deficit etc).  Exclusions related to disorders in organ function:  a) Clinically relevant hepatic dysfunction indicated by: i. bilirubin >2 times upper limit normal ii. and / or hepatic transaminases >3 times upper limit normal iii. and / or signs of severe hepatic insufficiency (e.g. impaired albumin synthesis with an albumin < 32 g/l, hepatic encephalopathy > grade 1a: West Haven Criteria of Altered Mental Status In Hepatic Encephalopathy) b) Renal insufficiency (glomerular filtration rate <30 ml/min e.g. calculated based on the Cockcroft formula).